Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
System.IO related functions.
Synopsis
- read_file_utf8_text :: FilePath -> IO Text
- read_file_utf8 :: FilePath -> IO String
- read_file_utf8_or :: String -> FilePath -> IO String
- write_file_utf8 :: FilePath -> String -> IO ()
- read_file_iso_8859_1 :: FilePath -> IO String
- read_file_locale :: FilePath -> IO String
- interactWithFiles :: FilePath -> FilePath -> (String -> String) -> IO ()
- getLineFromStdinIfReady :: IO (Maybe String)
- getAvailableLinesFromStdin :: IO [String]
- interactWithStdio :: (String -> String) -> IO ()
Documentation
read_file_utf8_text :: FilePath -> IO Text Source #
decodeUtf8
of readFile
, implemented via Data.Text.
read_file_utf8 :: FilePath -> IO String Source #
Read (strictly) a UTF-8 encoded text file, implemented via Data.Text.
read_file_utf8_or :: String -> FilePath -> IO String Source #
read_file_utf8
, or a default value if the file doesn't exist.
interactWithFiles :: FilePath -> FilePath -> (String -> String) -> IO () Source #
Interact with files. Like Prelude.interact, but with named files.
getLineFromStdinIfReady :: IO (Maybe String) Source #
Get line from stdin if there is any input, else Nothing.
getAvailableLinesFromStdin :: IO [String] Source #
Wait for input to be available, and then get lines while input remains available.