readfile

readFile :: FilePath -> IO String
base Prelude, base System.IO
The readFile function reads a file and returns the contents of the file as a string. The file is read lazily, on demand, as with getContents.
readFile :: FilePath -> IO ByteString
bytestring Data.ByteString.Lazy
Read an entire file lazily into a ByteString. The Handle will be held open until EOF is encountered.
readFile :: FilePath -> IO ByteString
bytestring Data.ByteString.Lazy.Char8
Read an entire file lazily into a ByteString. Use 'text mode' on Windows to interpret newlines
readFile :: FilePath -> IO ByteString
bytestring Data.ByteString.Char8
Read an entire file strictly into a ByteString. This is far more efficient than reading the characters into a String and then using pack. It also may be more efficient than opening the file and reading it using hGet.
readFile :: FilePath -> IO ByteString
bytestring Data.ByteString
Read an entire file strictly into a ByteString. This is far more efficient than reading the characters into a String and then using pack. It also may be more efficient than opening the file and reading it using hGet. Files are read using 'binary mode' on Windows, for 'text mode' use the Char8 version of this function.
readFile :: FilePath -> IO Text
text Data.Text.Lazy.IO
Read a file and return its contents as a string. The file is read lazily, as with getContents.
readFile :: FilePath -> IO Text
text Data.Text.IO
The readFile function reads a file and returns the contents of the file as a string. The entire file is read strictly, as with getContents.