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. readMaybe :: Read a => String -> Maybe a

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

  2. readParen :: Bool -> ReadS a -> ReadS a

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

  3. reads :: Read a => ReadS a

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

  4. readsPrec :: Read a => Int -> ReadS a

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

  5. readFields :: ByteString -> Either ParseError [Field Position]

    Cabal-syntax Distribution.Fields

    Parse cabal style ByteString into list of Fields, i.e. the cabal AST. readFields assumes that input ByteString is valid UTF8, specifically it doesn't validate that file is valid UTF8. Therefore bytestrings inside returned Field will be invalid as UTF8 if the input were.

    >>> readFields "foo: \223"
    Right [Field (Name (Position 1 1) "foo") [FieldLine (Position 1 6) "\223"]]
    
    readFields won't (necessarily) fail on invalid UTF8 data, but the reported positions may be off. You may get weird errors on non-UTF8 input, for example readFields will fail on latin1 encoded non-breaking space:
    >>> isLeft (readFields "\xa0 foo: bar")
    True
    
    That is rejected because parser thinks \xa0 is a section name, and section arguments may not contain colon. If there are just latin1 non-breaking spaces, they become part of the name:
    >>> readFields "\xa0\&foo: bar"
    Right [Field (Name (Position 1 1) "\160foo") [FieldLine (Position 1 7) "bar"]]
    
    The UTF8 non-breaking space is accepted as an indentation character (but warned about by readFields').
    >>> readFields' "\xc2\xa0 foo: bar"
    Right ([Field (Name (Position 1 3) "foo") [FieldLine (Position 1 8) "bar"]],[LexWarning LexWarningNBSP (Position 1 1)])
    

  6. readFields' :: ByteString -> Either ParseError ([Field Position], [LexWarning])

    Cabal-syntax Distribution.Fields

    Like readFields but also return lexer warnings.

  7. readFields :: ByteString -> Either ParseError [Field Position]

    Cabal-syntax Distribution.Fields.Parser

    Parse cabal style ByteString into list of Fields, i.e. the cabal AST. readFields assumes that input ByteString is valid UTF8, specifically it doesn't validate that file is valid UTF8. Therefore bytestrings inside returned Field will be invalid as UTF8 if the input were.

    >>> readFields "foo: \223"
    Right [Field (Name (Position 1 1) "foo") [FieldLine (Position 1 6) "\223"]]
    
    readFields won't (necessarily) fail on invalid UTF8 data, but the reported positions may be off. You may get weird errors on non-UTF8 input, for example readFields will fail on latin1 encoded non-breaking space:
    >>> isLeft (readFields "\xa0 foo: bar")
    True
    
    That is rejected because parser thinks \xa0 is a section name, and section arguments may not contain colon. If there are just latin1 non-breaking spaces, they become part of the name:
    >>> readFields "\xa0\&foo: bar"
    Right [Field (Name (Position 1 1) "\160foo") [FieldLine (Position 1 7) "bar"]]
    
    The UTF8 non-breaking space is accepted as an indentation character (but warned about by readFields').
    >>> readFields' "\xc2\xa0 foo: bar"
    Right ([Field (Name (Position 1 3) "foo") [FieldLine (Position 1 8) "bar"]],[LexWarning LexWarningNBSP (Position 1 1)])
    

  8. readFields' :: ByteString -> Either ParseError ([Field Position], [LexWarning])

    Cabal-syntax Distribution.Fields.Parser

    Like readFields but also return lexer warnings.

  9. readUTF8File :: FilePath -> IO String

    Cabal-syntax Distribution.Utils.Generic

    Reads a UTF8 encoded text file as a Unicode String Reads lazily using ordinary readFile.

  10. readMaybe :: (PrimMonad m, Indexed sh, Storable a) => Array m sh a -> Index sh -> Maybe (m a)

    comfort-array Data.Array.Comfort.Storable.Mutable

    No documentation available.

Page 128 of many | Previous | Next