gambler-0.1.0.0: Composable, streaming, and efficient left folds
Safe HaskellSafe-Inferred
LanguageGHC2021

Fold.Shortcut.Type

Synopsis

Documentation

data ShortcutFold a b Source #

Processes inputs of type a, has the ability to halt midway through the stream, and results in a value of type b

Constructors

forall x y. ShortcutFold 

Fields

Instances

Instances details
Applicative (ShortcutFold a) Source # 
Instance details

Defined in Fold.Shortcut.Type

Methods

pure :: a0 -> ShortcutFold a a0 #

(<*>) :: ShortcutFold a (a0 -> b) -> ShortcutFold a a0 -> ShortcutFold a b #

liftA2 :: (a0 -> b -> c) -> ShortcutFold a a0 -> ShortcutFold a b -> ShortcutFold a c #

(*>) :: ShortcutFold a a0 -> ShortcutFold a b -> ShortcutFold a b #

(<*) :: ShortcutFold a a0 -> ShortcutFold a b -> ShortcutFold a a0 #

Functor (ShortcutFold a) Source # 
Instance details

Defined in Fold.Shortcut.Type

Methods

fmap :: (a0 -> b) -> ShortcutFold a a0 -> ShortcutFold a b #

(<$) :: a0 -> ShortcutFold a b -> ShortcutFold a a0 #

Monoid b => Monoid (ShortcutFold a b) Source # 
Instance details

Defined in Fold.Shortcut.Type

Semigroup b => Semigroup (ShortcutFold a b) Source # 
Instance details

Defined in Fold.Shortcut.Type

Methods

(<>) :: ShortcutFold a b -> ShortcutFold a b -> ShortcutFold a b #

sconcat :: NonEmpty (ShortcutFold a b) -> ShortcutFold a b #

stimes :: Integral b0 => b0 -> ShortcutFold a b -> ShortcutFold a b #

data Will Source #

Constructors

Ambivalent 
Tenacious 

Instances

Instances details
Monoid Will Source # 
Instance details

Defined in Strict

Methods

mempty :: Will #

mappend :: Will -> Will -> Will #

mconcat :: [Will] -> Will #

Semigroup Will Source # 
Instance details

Defined in Strict

Methods

(<>) :: Will -> Will -> Will #

sconcat :: NonEmpty Will -> Will #

stimes :: Integral b => b -> Will -> Will #

data Vitality a b Source #

Constructors

Dead a 
Alive Will b 

Instances

Instances details
Functor (Vitality a) Source # 
Instance details

Defined in Strict

Methods

fmap :: (a0 -> b) -> Vitality a a0 -> Vitality a b #

(<$) :: a0 -> Vitality a b -> Vitality a a0 #