Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Getting an EffectfulFold
from some other type of fold
Synopsis
- fold :: Monad m => Fold a b -> EffectfulFold m a b
- nonemptyFold :: Monad m => NonemptyFold a b -> EffectfulFold m a (Maybe b)
- shortcutFold :: Monad m => ShortcutFold a b -> EffectfulFold m a b
- shortcutNonemptyFold :: Monad m => ShortcutNonemptyFold a b -> EffectfulFold m a (Maybe b)
Documentation
fold :: Monad m => Fold a b -> EffectfulFold m a b Source #
Generalize a pure fold to an effectful fold
nonemptyFold :: Monad m => NonemptyFold a b -> EffectfulFold m a (Maybe b) Source #
Turn a nonempty fold that requires at least one input into a fold that
returns Nothing
when there are no inputs
shortcutFold :: Monad m => ShortcutFold a b -> EffectfulFold m a b Source #
shortcutNonemptyFold :: Monad m => ShortcutNonemptyFold a b -> EffectfulFold m a (Maybe b) Source #