Hoogle Search

Within LTS Haskell 24.43 (ghc-9.10.3)

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

  1. byteStringBytes :: ByteString -> Unfoldr Word8

    deferred-folds DeferredFolds.Unfoldr

    Bytes of a bytestring

  2. byteStringOf :: forall (st :: ZeroBitType) e a . ParserT st e a -> ParserT st e ByteString

    flatparse FlatParse.Basic

    Return the ByteString consumed by a parser. Note: it's more efficient to use spanOf and withSpan instead.

  3. byteStringOf :: forall (st :: ZeroBitType) r e a . ParserT st r e a -> ParserT st r e ByteString

    flatparse FlatParse.Stateful

    Return the ByteString consumed by a parser. Note: it's more efficient to use spanOf and withSpan instead.

  4. byteStringToInteger :: ByteString -> Integer

    integer-conversion Data.Integer.Conversion

    Convert ByteString to Integer. Semantically same as BS.foldl' (acc c -> acc * 10 + toInteger c - 48) 0, but this is more efficient.

    >>> byteStringToInteger "123456789"
    123456789
    
    For non-decimal inputs some nonsense is calculated
    >>> byteStringToInteger "foobar"
    6098556
    

  5. package bytestring-lexing

    Efficiently parse and produce common integral and fractional numbers. The bytestring-lexing package offers extremely efficient ByteString parsers for some common lexemes: namely integral and fractional numbers. In addition, it provides efficient serializers for (some of) the formats it parses. As of version 0.3.0, bytestring-lexing offers the best-in-show parsers for integral values. (According to the Warp web server's benchmark of parsing the Content-Length field of HTTP headers.) And as of version 0.5.0 it offers (to my knowledge) the best-in-show parser for fractional/floating numbers. Some benchmarks for this package can be found at: https://github.com/wrengr/bytestring-lexing/tree/master/bench/html

  6. bytestring16 :: Word16 -> ByteString

    network-byte-order Network.ByteOrder

    >>> let w = foldl' (\x y -> x * 256 + y) 0 [5,6] :: Word16
    
    >>> unpack $ bytestring16 w
    [5,6]
    

  7. bytestring32 :: Word32 -> ByteString

    network-byte-order Network.ByteOrder

    >>> let w = foldl' (\x y -> x * 256 + y) 0 [5,6,7,8] :: Word32
    
    >>> unpack $ bytestring32 w
    [5,6,7,8]
    

  8. bytestring64 :: Word64 -> ByteString

    network-byte-order Network.ByteOrder

    >>> let w = foldl' (\x y -> x * 256 + y) 0 [1,2,3,4,5,6,7,8] :: Word64
    
    >>> unpack $ bytestring64 w
    [1,2,3,4,5,6,7,8]
    

  9. bytestring8 :: Word8 -> ByteString

    network-byte-order Network.ByteOrder

    >>> let w = 5 :: Word8
    
    >>> unpack $ bytestring8 w
    [5]
    

  10. bytestringBE :: ByteString -> Pair NatRepr BV

    bv-sized Data.BitVector.Sized

    Construct a BV from a big-endian bytestring.

    >>> case bytestringBE (BS.pack [0, 1, 1]) of p -> (fstPair p, sndPair p)
    (24,BV 257)
    

Page 22 of many | Previous | Next