-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | control-monad-loop port for effin
--
@package loop-effin
@version 0.1.0.0
module Control.Effect.Loop
-- | Loop c e indicates an effect with ability to continue
-- with c or exit with e.
data Loop c e a
-- | Lift a CPS style computation with continuation and exit handler to the
-- Effect monad.
loop :: EffectLoop c e l => (forall r. (c -> r) -> (e -> r) -> (a -> r) -> r) -> Effect l a
stepLoop :: Effect (Loop c e :+ l) c -> (c -> Effect l e) -> Effect l e
data LoopState c e a
loop' :: EffectLoop c e l => LoopState c e a -> Effect l a
toCPS :: LoopState c e a -> Loop c e a
fromCPS :: Loop c e a -> LoopState c e a
continue :: EffectLoop () e l => Effect l a
exit :: EffectLoop c () l => Effect l a
continueWith :: EffectLoop c e l => c -> Effect l a
exitWith :: EffectLoop c e l => e -> Effect l a
foreach :: [a] -> (a -> Effect (Loop c () :+ l) c) -> Effect l ()
while :: Effect l Bool -> Effect (Loop c () :+ l) c -> Effect l ()
doWhile :: Effect (Loop a a :+ l) a -> Effect l Bool -> Effect l a
once :: Effect (Loop a a :+ l) a -> Effect l a
repeatLoop :: Effect (Loop c e :+ l) a -> Effect l e
iterateLoop :: c -> (c -> Effect (Loop c e :+ l) c) -> Effect l e
instance Typeable Loop
instance Functor (Loop c e)
instance (Read c, Read e, Read a) => Read (LoopState c e a)
instance (Show c, Show e, Show a) => Show (LoopState c e a)
instance (Eq c, Eq e, Eq a) => Eq (LoopState c e a)
instance (Ord c, Ord e, Ord a) => Ord (LoopState c e a)
instance MemberEffect Loop (Loop c e) l => EffectLoop c e l