Created
August 9, 2020 01:21
-
-
Save tmciver/1cefd940707708e728405bf38ef25a41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.IO | |
import System.IO.Temp (withSystemTempFile) | |
f :: FilePath -> Handle -> IO () | |
f fp h = do | |
hSetBuffering h NoBuffering | |
hPutStr h "Test" | |
contents <- hGetContents h | |
putStrLn ("contents is: " ++ contents) | |
main = withSystemTempFile "test-" f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment