Hoogle Search

Within LTS Haskell 24.32 (ghc-9.10.3)

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

  1. readFileUTF8 :: FilePath -> IO String

    extra System.IO.Extra

    Like readFile, but with the encoding utf8.

  2. readFileUTF8' :: FilePath -> IO String

    extra System.IO.Extra

    A strict version of readFileUTF8, see readFile' for details.

  3. readBin :: (Eq a, Num a) => ReadS a

    base-compat Numeric.Compat

    Read an unsigned number in binary notation.

    >>> readBin "10011"
    [(19,"")]
    

  4. readFile' :: FilePath -> IO String

    base-compat System.IO.Compat

    The readFile' function reads a file and returns the contents of the file as a string. The file is fully read before being returned, as with getContents'.

  5. readEither :: Read a => String -> Either String a

    base-compat Text.Read.Compat

    Parse a string using the Read instance. Succeeds if there is exactly one valid result. A Left value indicates a parse error.

    >>> readEither "123" :: Either String Int
    Right 123
    
    >>> readEither "hello" :: Either String Int
    Left "Prelude.read: no parse"
    

  6. readList :: Read a => ReadS [a]

    base-compat Text.Read.Compat

    The method readList is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined Read instance of the Char type, where values of type String are expected to use double quotes, rather than square brackets.

  7. readListDefault :: Read a => ReadS [a]

    base-compat Text.Read.Compat

    A possible replacement definition for the readList method (GHC only). This is only needed for GHC, and even then only for Read instances where readListPrec isn't defined as readListPrecDefault.

  8. readListPrec :: Read a => ReadPrec [a]

    base-compat Text.Read.Compat

    Proposed replacement for readList using new-style parsers (GHC only). The default definition uses readList. Instances that define readPrec should also define readListPrec as readListPrecDefault.

  9. readListPrecDefault :: Read a => ReadPrec [a]

    base-compat Text.Read.Compat

    A possible replacement definition for the readListPrec method, defined using readPrec (GHC only).

  10. readMaybe :: Read a => String -> Maybe a

    base-compat Text.Read.Compat

    Parse a string using the Read instance. Succeeds if there is exactly one valid result.

    >>> readMaybe "123" :: Maybe Int
    Just 123
    
    >>> readMaybe "hello" :: Maybe Int
    Nothing
    

Page 106 of many | Previous | Next