hmt-base-0.20: Haskell Music Theory Base
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Io

Description

System.IO related functions.

Synopsis

Documentation

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.

write_file_utf8 :: FilePath -> String -> IO () Source #

Write UTF8 string as file, via Data.Text.

read_file_iso_8859_1 :: FilePath -> IO String Source #

readFile variant using Text for ISO 8859-1 (Latin 1) encoding.

read_file_locale :: FilePath -> IO String Source #

readFile variant using Text for local encoding.

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.

interactWithStdio :: (String -> String) -> IO () Source #

Interact with stdin and stdout. Like Prelude.interact, but with pipes.