Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 将putStrLn的输出写入文本文件_Haskell_Io_Ghc - Fatal编程技术网

Haskell 将putStrLn的输出写入文本文件

Haskell 将putStrLn的输出写入文本文件,haskell,io,ghc,Haskell,Io,Ghc,在哈斯克尔。是否有写入putStrln(ghc/ghci)输出的方法,例如: putStrLn(printf$“这是一个示例字符串”) 到 writeFile“example.txt”$“[从上面的putStrLn输出]”当然,不要调用putStrLn writeFile "example.txt" $ printf $ "this is a example string" 当然,在本例中,首先不需要printf writeFile "example.txt" "this is a examp

在哈斯克尔。是否有写入putStrln(ghc/ghci)输出的方法,例如:

putStrLn(printf$“这是一个示例字符串”)


writeFile“example.txt”$“[从上面的putStrLn输出]”

当然,不要调用
putStrLn

writeFile "example.txt" $ printf $ "this is a example string"
当然,在本例中,首先不需要
printf

writeFile "example.txt" "this is a example string"

当然,不要调用
putStrLn

writeFile "example.txt" $ printf $ "this is a example string"
当然,在本例中,首先不需要
printf

writeFile "example.txt" "this is a example string"