{-# OPTIONS_HADDOCK not-home #-}
module Control.Effect.Base (
Eff
, run
, lift
, lift1
, Effect
, send
, (:<)
, (:<<)
, interpret
, Handle
, handle
, liftH
, abort
, control
, control0
, locally
, IOE(..)
, MonadIO(..)
, runIO
) where
import Control.Monad.IO.Class
import Control.Effect.Internal
interpret
:: forall eff a effs
. (forall m b. eff m b -> Eff (eff ': effs) b)
-> Eff (eff ': effs) a
-> Eff effs a
interpret :: (forall (m :: * -> *) b. eff m b -> Eff (eff : effs) b)
-> Eff (eff : effs) a -> Eff effs a
interpret forall (m :: * -> *) b. eff m b -> Eff (eff : effs) b
f = (a -> Eff effs a)
-> (forall (effs' :: [Effect]) b.
(eff :< effs') =>
eff (Eff effs') b -> Handle eff effs a a effs' b)
-> Eff (eff : effs) a
-> Eff effs a
forall (eff :: Effect) a r (effs :: [Effect]).
(a -> Eff effs r)
-> (forall (effs' :: [Effect]) b.
(eff :< effs') =>
eff (Eff effs') b -> Handle eff effs a r effs' b)
-> Eff (eff : effs) a
-> Eff effs r
handle a -> Eff effs a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Eff (eff : effs) b -> Handle eff effs a a effs' b
forall (eff :: Effect) (effs :: [Effect]) a i r
(effs' :: [Effect]).
Eff (eff : effs) a -> Handle eff effs i r effs' a
liftH (Eff (eff : effs) b -> Handle eff effs a a effs' b)
-> (eff (Eff effs') b -> Eff (eff : effs) b)
-> eff (Eff effs') b
-> Handle eff effs a a effs' b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. eff (Eff effs') b -> Eff (eff : effs) b
forall (m :: * -> *) b. eff m b -> Eff (eff : effs) b
f)