Hoogle Search
Within LTS Haskell 24.2 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
readFile :: FilePath -> (Stream (Of String) IO () -> IO a) -> IO astreaming Streaming.Prelude Read the lines of a file, using a function of the type: 'Stream (Of String) IO () -> IO a' to turn the stream into a value of type 'IO a'.
>>> S.writeFile "lines.txt" $ S.take 2 S.stdinLn hello<Enter> world<Enter> >>> S.readFile "lines.txt" S.print "hello" "world"
readFile :: FilePath -> IO (Either Text YiString)yi-rope Yi.Rope Reads file into the rope, also returning the ConverterName that was used for decoding. You should resupply this to writeFile if you're aiming to preserve the original encoding. If we fail to guess the encoding used, error message is given instead. It is up to the user to handle exceptions not directly related to character decoding.
readFile :: FilePath -> IO Textpandoc Text.Pandoc.UTF8 No documentation available.
readFile :: FilePath -> IO Bytesbyteslice Data.Bytes Read an entire file strictly into a Bytes.
readFile :: FilePath -> IO Chunksbyteslice Data.Bytes.Chunks Read an entire file strictly into chunks. If reading from a regular file, this makes an effort read the file into a single chunk.
readFile :: FilePath -> IO Textprotolude Protolude 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. Beware that this function (similarly to readFile) is locale-dependent. Unexpected system locale may cause your application to read corrupted data or throw runtime exceptions about "invalid argument (invalid byte sequence)" or "invalid argument (invalid character)". This is also slow, because GHC first converts an entire input to UTF-32, which is afterwards converted to UTF-8. If your data is UTF-8, using decodeUtf8 . readFile is a much faster and safer alternative.
readFile :: FilePath -> IO Stringghc-internal GHC.Internal.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 Stringnumeric-prelude NumericPrelude 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 Stringnumeric-prelude NumericPrelude.Base 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 Stringnumhask NumHask.Prelude 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.