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