@@ -36,7 +36,9 @@ import Effectful.Internal.Monad
3636----------------------------------------
3737-- Interpreter
3838
39−-- | Representation of the local 'Eff' environment.
39+-- | Opaque representation of the 'Eff' environment at the point of calling the
40+-- 'send' function, i.e. right before the control is passed to the effect
41+-- handler.
4042newtype LocalEnv es = LocalEnv (Env es)
4143
4244data Interpreter (e :: Effect) = forall handlerEs. Interpreter
@@ -133,7 +135,7 @@ reinterpretM runHandlerEs interpreter m = unsafeEff $ \es -> do
133135-- general version see 'localUnlift'.
134136localSeqUnlift
135137 :: LocalEnv localEs
136− -- ^ Local environment from the effect handler.
138+ -- ^ Local environment.
137139 -> ((forall r. Eff localEs r -> Eff es r) -> Eff es a)
138140 -- ^ Continuation with the unlifting function in scope.
139141 -> Eff es a
@@ -145,7 +147,7 @@ localSeqUnlift (LocalEnv les) f = unsafeEff $ \es -> do
145147localSeqUnliftIO
146148 :: IOE :> es
147149 => LocalEnv localEs
148− -- ^ Local environment from the effect handler.
150+ -- ^ Local environment.
149151 -> ((forall r. Eff localEs r -> IO r) -> IO a)
150152 -- ^ Continuation with the unlifting function in scope.
151153 -> Eff es a
@@ -159,7 +161,7 @@ localSeqUnliftIO (LocalEnv les) f = unsafeEff_ $ unEff (seqUnliftEff f) les
159161localSeqLiftUnliftIO
160162 :: IOE :> es
161163 => LocalEnv localEs
162− -- ^ Local environment from the effect handler.
164+ -- ^ Local environment.
163165 -> ((forall r. IO r -> Eff localEs r) -> (forall r. Eff localEs r -> IO r) -> IO a)
164166 -- ^ Continuation with the lifting and unlifting function.
165167 -> Eff es a
@@ -169,7 +171,7 @@ localSeqLiftUnliftIO (LocalEnv les) f = unsafeEff_ $ do
169171-- | Create a local unlifting function with the given strategy.
170172localUnlift
171173 :: LocalEnv localEs
172− -- ^ Local environment from the effect handler.
174+ -- ^ Local environment.
173175 -> UnliftStrategy
174176 -> ((forall r. Eff localEs r -> Eff es r) -> Eff es a)
175177 -- ^ Continuation with the unlifting function in scope.
@@ -182,7 +184,7 @@ localUnlift (LocalEnv les) unlift f = unsafeEff $ \es -> case unlift of
182184localUnliftIO
183185 :: IOE :> es
184186 => LocalEnv localEs
185− -- ^ Local environment from the effect handler.
187+ -- ^ Local environment.
186188 -> UnliftStrategy
187189 -> ((forall r. Eff localEs r -> IO r) -> IO a)
188190 -- ^ Continuation with the unlifting function in scope.
@@ -212,7 +214,7 @@ localUnliftIO (LocalEnv les) unlift f = unsafeEff_ $ case unlift of
212214localLiftUnliftIO
213215 :: IOE :> es
214216 => LocalEnv localEs
215− -- ^ Local environment from the effect handler.
217+ -- ^ Local environment.
216218 -> UnliftStrategy
217219 -> ((forall r. IO r -> Eff localEs r) -> (forall r. Eff localEs r -> IO r) -> IO a)
218220 -- ^ Continuation with the lifting and unlifting function in scope.