Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class PolyCont k r a where
Documentation
class PolyCont k r a where Source #
A use case of an ad-hoc polymorphic delimited continuation.
Note that a PolyCont
is not a polymorphic delimited continuation,
since a PolyCont
does not support answer type modification.
runPolyCont :: k r' a -> (a -> r) -> r Source #
Run as a CPS function .
Instances
Alternative m => PolyCont Empty (m a) Void Source # | |
Defined in Control.Dsl.Empty | |
PolyCont k r a => PolyCont k (Cont r a') a Source # | The This derivated instance provide the ability similar
to |
Defined in Control.Dsl.Cont runPolyCont :: k r' a -> (a -> Cont r a') -> Cont r a' Source # | |
PolyCont k r Void => PolyCont k (State s r) Void Source # | |
Defined in Control.Dsl.State.State | |
PolyCont k r a => PolyCont k (State s r) a Source # | The This derivated instance provide the ability similar
to |
Defined in Control.Dsl.State.State runPolyCont :: k r' a -> (a -> State s r) -> State s r Source # | |
PolyCont Empty r Void => PolyCont Empty (Cont r a) Void Source # | |
Defined in Control.Dsl.Cont | |
PolyCont Empty r Void => PolyCont Empty (State s r) Void Source # | |
Defined in Control.Dsl.State.State | |
PolyCont Get (State s r) s Source # | |
Defined in Control.Dsl.State.Get | |
PolyCont (Return r) r Void Source # | |
Defined in Control.Dsl.Return | |
PolyCont (Shift r) r a Source # | |
Defined in Control.Dsl.Shift runPolyCont :: Shift r r' a -> (a -> r) -> r Source # | |
Monad m => PolyCont (Monadic m) (m b) a Source # | |
Defined in Control.Dsl.Monadic runPolyCont :: Monadic m r' a -> (a -> m b) -> m b Source # | |
Applicative m => PolyCont (Return r) (m r) Void Source # | |
Defined in Control.Dsl.Return | |
PolyCont (Yield x) [x] () Source # | |
Defined in Control.Dsl.Yield runPolyCont :: Yield x r' () -> (() -> [x]) -> [x] Source # | |
PolyCont (Return r) (Cont r' r) Void Source # | |
Defined in Control.Dsl.Cont | |
PolyCont (Return r) (State s r) Void Source # | |
Defined in Control.Dsl.State.State | |
PolyCont (Put s) (State s r) () Source # | |
Defined in Control.Dsl.State.Put | |
PolyCont (Yield x) (Cont r [x]) () Source # | |
Defined in Control.Dsl.Yield |