Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

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

  1. inetAny :: InetAddress

    socket System.Socket.Family.Inet

    0.0.0.0
    

  2. inet6Any :: Inet6Address

    socket System.Socket.Family.Inet6

    ::
    

  3. TooManyBytes :: StaticBytesException

    static-bytes Data.StaticBytes

    No documentation available.

  4. tooManyBytes :: Int -> Int -> String -> IO void

    store-core Data.Store.Core

    Throws a PeekException about an attempt to read too many bytes.

  5. many :: forall (m :: Type -> Type) a b c . Monad m => Fold m a b -> Fold m b c -> Fold m a c

    streamly-core Streamly.Data.Fold

    Collect zero or more applications of a fold. many first second applies the first fold repeatedly on the input stream and accumulates it's results using the second fold.

    >>> two = Fold.take 2 Fold.toList
    
    >>> twos = Fold.many two Fold.toList
    
    >>> Stream.fold twos $ Stream.fromList [1..10]
    [[1,2],[3,4],[5,6],[7,8],[9,10]]
    
    Stops when second fold stops. See also: concatMap, foldMany

  6. many :: forall (m :: Type -> Type) a b c . Monad m => Parser a m b -> Fold m b c -> Parser a m c

    streamly-core Streamly.Data.Parser

    Collect zero or more parses. Apply the supplied parser repeatedly on the input stream and push the parse results to a downstream fold. Stops: when the downstream fold stops or the parser fails. Fails: never, produces zero or more results.

    >>> many = Parser.countBetween 0 maxBound
    
    Compare with many.

  7. manyTill :: forall (m :: Type -> Type) a b x c . Monad m => Parser a m b -> Parser a m x -> Fold m b c -> Parser a m c

    streamly-core Streamly.Data.Parser

    manyTill chunking test f tries the parser test on the input, if test fails it backtracks and tries chunking, after chunking succeeds test is tried again and so on. The parser stops when test succeeds. The output of test is discarded and the output of chunking is accumulated by the supplied fold. The parser fails if chunking fails. Stops when the fold f stops.

  8. foldMany :: forall (m :: Type -> Type) a b . Monad m => Fold m a b -> Stream m a -> Stream m b

    streamly-core Streamly.Data.Stream

    Apply a Fold repeatedly on a stream and emit the results in the output stream. Definition:

    >>> foldMany f = Stream.parseMany (Parser.fromFold f)
    
    Example, empty stream:
    >>> f = Fold.take 2 Fold.sum
    
    >>> fmany = Stream.fold Fold.toList . Stream.foldMany f
    
    >>> fmany $ Stream.fromList []
    []
    
    Example, last fold empty:
    >>> fmany $ Stream.fromList [1..4]
    [3,7]
    
    Example, last fold non-empty:
    >>> fmany $ Stream.fromList [1..5]
    [3,7,5]
    
    Note that using a closed fold e.g. Fold.take 0, would result in an infinite stream on a non-empty input stream.

  9. parseMany :: forall (m :: Type -> Type) a b . Monad m => Parser a m b -> Stream m a -> Stream m (Either ParseError b)

    streamly-core Streamly.Data.Stream

    Apply a Parser repeatedly on a stream and emit the parsed values in the output stream. Example:

    >>> s = Stream.fromList [1..10]
    
    >>> parser = Parser.takeBetween 0 2 Fold.sum
    
    >>> Stream.fold Fold.toList $ Stream.parseMany parser s
    [Right 3,Right 7,Right 11,Right 15,Right 19]
    
    This is the streaming equivalent of the many parse combinator. Known Issues: When the parser fails there is no way to get the remaining stream.

  10. unfoldMany :: forall (m :: Type -> Type) a b . Monad m => Unfold m a b -> Stream m a -> Stream m b

    streamly-core Streamly.Data.Stream

    unfoldMany unfold stream uses unfold to map the input stream elements to streams and then flattens the generated streams into a single output stream. Like concatMap but uses an Unfold for stream generation. Unlike concatMap this can fuse the Unfold code with the inner loop and therefore provide many times better performance.

Page 204 of many | Previous | Next