Hoogle Search

Within LTS Haskell 24.31 (ghc-9.10.3)

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

  1. readWord8OffPtr :: Ptr Word8 -> Int -> IO Word8

    base GHC.Storable

    No documentation available.

  2. readWordOffPtr :: Ptr Word -> Int -> IO Word

    base GHC.Storable

    No documentation available.

  3. readFile :: FilePath -> IO ByteString

    bytestring Data.ByteString

    Read an entire file strictly into a ByteString.

  4. readFile :: FilePath -> IO ByteString

    bytestring Data.ByteString.Char8

    Read an entire file strictly into a ByteString.

  5. readInt :: ByteString -> Maybe (Int, ByteString)

    bytestring Data.ByteString.Char8

    Try to read a signed Int value from the ByteString, returning Just (val, str) on success, where val is the value read and str is the rest of the input string. If the sequence of digits decodes to a value larger than can be represented by an Int, the returned value will be Nothing. readInt does not ignore leading whitespace, the value must start immediately at the beginning of the input string.

    Examples

    >>> readInt "-1729 sum of cubes"
    Just (-1729," sum of cubes")
    
    >>> readInt "+1: readInt also accepts a leading '+'"
    Just (1, ": readInt also accepts a leading '+'")
    
    >>> readInt "not a decimal number"
    Nothing
    
    >>> readInt "12345678901234567890 overflows maxBound"
    Nothing
    
    >>> readInt "-12345678901234567890 underflows minBound"
    Nothing
    

  6. readInt16 :: ByteString -> Maybe (Int16, ByteString)

    bytestring Data.ByteString.Char8

    A variant of readInt specialised to Int16.

  7. readInt32 :: ByteString -> Maybe (Int32, ByteString)

    bytestring Data.ByteString.Char8

    A variant of readInt specialised to Int32.

  8. readInt64 :: ByteString -> Maybe (Int64, ByteString)

    bytestring Data.ByteString.Char8

    A variant of readInt specialised to Int64.

  9. readInt8 :: ByteString -> Maybe (Int8, ByteString)

    bytestring Data.ByteString.Char8

    A variant of readInt specialised to Int8.

  10. readInteger :: ByteString -> Maybe (Integer, ByteString)

    bytestring Data.ByteString.Char8

    readInteger reads an Integer from the beginning of the ByteString. If there is no Integer at the beginning of the string, it returns Nothing, otherwise it just returns the Integer read, and the rest of the string. readInteger does not ignore leading whitespace, the value must start immediately at the beginning of the input string.

    Examples

    >>> readInteger "-000111222333444555666777888999 all done"
    Just (-111222333444555666777888999," all done")
    
    >>> readInteger "+1: readInteger also accepts a leading '+'"
    Just (1, ": readInteger also accepts a leading '+'")
    
    >>> readInteger "not a decimal number"
    Nothing
    

Page 67 of many | Previous | Next