Hoogle Search

Within LTS Haskell 22.23 (ghc-9.6.5)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. readFile :: FilePath -> IO String

    Cabal-syntax Distribution.Compat.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.

  2. readFile :: FilePath -> IO String

    ghc-lib-parser GHC.Prelude.Basic

    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.

  3. readFile :: MonadSafe m => FilePath -> Producer' String m ()

    pipes-safe Pipes.Safe.Prelude

    Read lines from a file, automatically opening and closing the file as necessary

  4. readFile :: FilePath -> IO Bytes

    byteslice Data.Bytes

    Read an entire file strictly into a Bytes.

  5. readFile :: FilePath -> IO Chunks

    byteslice 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.

  6. readFile :: FilePath -> (Stream (Of String) IO () -> IO a) -> IO a

    streaming 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"
    

  7. readFile :: MonadIO m => FilePath -> m ByteString

    classy-prelude ClassyPrelude

    Strictly read a file into a ByteString.

  8. readFile :: FilePath -> IO String

    numeric-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.

  9. readFile :: FilePath -> IO String

    numeric-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.

  10. readFile :: FilePath -> IO Text

    protolude 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.

Page 3 of many | Previous | Next