pandora-0.5.1: A box of patterns and paradigms
Safe HaskellSafe-Inferred
LanguageHaskell2010

Pandora.Paradigm.Primary.Transformer.Continuation

Synopsis

Documentation

newtype Continuation r t a Source #

Constructors

Continuation ((((->) ::|:. a) :. t) := r) 

Instances

Instances details
(forall (u :: Type -> Type). Bindable ((->) :: Type -> Type -> Type) u) => Liftable ((->) :: Type -> Type -> Type) (Continuation r) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Transformer.Continuation

Methods

lift :: Covariant (->) (->) u => u a -> Continuation r u a Source #

Covariant ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) t => Covariant ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) (Continuation r t) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Transformer.Continuation

Methods

(<-|-) :: (a -> b) -> Continuation r t a -> Continuation r t b Source #

(<-|--) :: (a -> b) -> Continuation r t a -> Continuation r t b Source #

(<-|---) :: (a -> b) -> Continuation r t a -> Continuation r t b Source #

(<-|----) :: (a -> b) -> Continuation r t a -> Continuation r t b Source #

(<-|-----) :: (a -> b) -> Continuation r t a -> Continuation r t b Source #

(<-|------) :: (a -> b) -> Continuation r t a -> Continuation r t b Source #

(<-|-------) :: (a -> b) -> Continuation r t a -> Continuation r t b Source #

(<-|--------) :: (a -> b) -> Continuation r t a -> Continuation r t b Source #

(<-|-|-) :: (Covariant (->) (Betwixt (->) (->)) u, Covariant (Betwixt (->) (->)) (->) (Continuation r t)) => (a -> b) -> Continuation r t (u a) -> Continuation r t (u b) Source #

(<-|-|-|-) :: (Covariant (->) (Betwixt (->) (Betwixt (->) (->))) v, Covariant (Betwixt (->) (Betwixt (->) (->))) (Betwixt (Betwixt (->) (->)) (->)) u, Covariant (Betwixt (Betwixt (->) (->)) (->)) (->) (Continuation r t)) => (a -> b) -> Continuation r t (u (v a)) -> Continuation r t (u (v b)) Source #

Covariant ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) t => Bindable ((->) :: Type -> Type -> Type) (Continuation r t) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Transformer.Continuation

Methods

(=<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

(==<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

(===<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

(====<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

(=====<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

(======<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

(=======<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

(========<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

(=========<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #

Interpreted ((->) :: Type -> Type -> Type) (Continuation r t) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Transformer.Continuation

Associated Types

type Primary (Continuation r t) a Source #

Methods

run :: Continuation r t a -> Primary (Continuation r t) a Source #

unite :: Primary (Continuation r t) a -> Continuation r t a Source #

(!) :: Continuation r t a -> Primary (Continuation r t) a Source #

(=#-) :: (Semigroupoid (->), Interpreted (->) u) => (Primary (Continuation r t) a -> Primary u b) -> Continuation r t a -> u b Source #

(-#=) :: (Semigroupoid (->), Interpreted (->) u) => (Continuation r t a -> u b) -> Primary (Continuation r t) a -> Primary u b Source #

(<$=#-) :: (Semigroupoid (->), Covariant (->) (->) j, Interpreted (->) u) => (Primary (Continuation r t) a -> Primary u b) -> (j := Continuation r t a) -> (j := u b) Source #

(-#=$>) :: (Covariant (->) (->) j, Interpreted (->) u) => (Continuation r t a -> u b) -> (j := Primary (Continuation r t) a) -> (j := Primary u b) Source #

type Primary (Continuation r t) a Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Transformer.Continuation

type Primary (Continuation r t) a = ((((->) :: Type -> Type -> Type) ::|:. a) :. t) := r

cwcc :: ((a -> Continuation r t b) -> Continuation r t a) -> Continuation r t a Source #

Call with current continuation

reset :: (forall u. Bindable (->) u, Monad (->) t) => Continuation r t r -> Continuation s t r Source #

Delimit the continuation of any shift

shift :: Monoidal (-->) (-->) (:*:) (:*:) t => ((a -> t r) -> Continuation r t r) -> Continuation r t a Source #

Capture the continuation up to the nearest enclosing reset and pass it

interruptable :: Monoidal (-->) (-->) (:*:) (:*:) t => ((a -> Continuation a t a) -> Continuation a t a) -> t a Source #