Skip to content

Instantly share code, notes, and snippets.

@etrepum
Created January 10, 2014 18:04
Show Gist options
  • Save etrepum/8359367 to your computer and use it in GitHub Desktop.
Save etrepum/8359367 to your computer and use it in GitHub Desktop.
Prelude IO functions that act on stdin/stdout
$ echo ':browse Prelude' | ghci | grep '\(::\|->\) IO ' | grep -v '\(FilePath\|IOError\)'
getChar :: IO Char
getContents :: IO String
getLine :: IO String
interact :: (String -> String) -> IO ()
print :: Show a => a -> IO ()
putChar :: Char -> IO ()
putStr :: String -> IO ()
putStrLn :: String -> IO ()
readIO :: Read a => String -> IO a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment