Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Boozer r s m a
- iterBoozer :: ([s] -> a -> z) -> ((s -> z) -> z) -> (r -> z -> z) -> (forall x. m x -> (x -> z) -> z) -> Boozer r s m a -> z
- hoistBoozer :: Functor n => (forall x. m x -> n x) -> Boozer r s m a -> Boozer r s n a
- newtype Patron r s m a = Patron {}
- runPatron :: Patron r s m a -> Boozer r s m a
Documentation
Boozer is the initial encoding of a consumer.
Drink (s -> Boozer r s m a) | |
Spit s (Boozer r s m a) | |
Call r (Boozer r s m a) | |
Lift (m (Boozer r s m a)) | |
Pure a |
Functor m => MonadDrunk r s (Boozer r s m) Source # | |
MonadReader x m => MonadReader x (Boozer r s m) Source # | |
MonadState x m => MonadState x (Boozer r s m) Source # | |
MonadTrans (Boozer r s) Source # | |
Functor m => Monad (Boozer r s m) Source # | |
Functor m => Functor (Boozer r s m) Source # | |
Functor m => Applicative (Boozer r s m) Source # | |
MonadIO m => MonadIO (Boozer r s m) Source # | |
:: ([s] -> a -> z) | return |
-> ((s -> z) -> z) | drink |
-> (r -> z -> z) | call |
-> (forall x. m x -> (x -> z) -> z) | bind |
-> Boozer r s m a | |
-> z |
Tear down a Boozer
, maintaining a stack of leftovers.
newtype Patron r s m a Source #
MonadDrunk r s (Patron r s m) Source # | |
MonadReader x m => MonadReader x (Patron r s m) Source # | |
MonadState x m => MonadState x (Patron r s m) Source # | |
MonadTrans (Patron r s) Source # | |
Monad (Patron r s m) Source # | |
Functor (Patron r s m) Source # | |
Applicative (Patron r s m) Source # | |
MonadIO m => MonadIO (Patron r s m) Source # | |