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.Char8
Read an entire file lazily into a ByteString.
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
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.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 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.