@@ -84,12 +84,12 @@ import Effectful.Internal.Unlift
8484
8585type role Eff nominal representational
8686
87−-- | The 'Eff' monad provides the implementation of an operation that performs
87+-- | The 'Eff' monad provides the implementation of a computation that performs
8888-- an arbitrary set of effects. In @'Eff' es a@, @es@ is a type-level list that
89−-- contains all the effects that the operation may perform. For example, an
90−-- operation that produces an 'Integer' by consuming a 'String' from the global
91−-- environment and acting upon a single mutable value of type 'Bool' would have
92−-- the following type:
89+-- contains all the effects that the computation may perform. For example, a
90+-- computation that produces an 'Integer' by consuming a 'String' from the
91+-- global environment and acting upon a single mutable value of type 'Bool'
92+-- would have the following type:
9393--
9494-- @
9595-- 'Eff' '['Effectful.Reader.Reader' 'String', 'Effectful.State.State' 'Bool'] 'Integer'
@@ -97,7 +97,7 @@ type role Eff nominal representational
9797--
9898-- Normally, a concrete list of effects is not used to parameterize 'Eff'.
9999-- Instead, the '(:>)' type class is used to express constraints on the list of
100−-- effects without coupling an operation to a concrete list of effects. For
100+-- effects without coupling a computation to a concrete list of effects. For
101101-- example, the above example would more commonly be expressed with the
102102-- following type:
103103--
@@ -105,15 +105,15 @@ type role Eff nominal representational
105105-- ('Effectful.Reader.Reader' 'String' ':>' es, 'Effectful.State.State' 'Bool' ':>' es) => 'Eff' es 'Integer'
106106-- @
107107--
108−-- This abstraction allows the operation to be used in functions that may
108+-- This abstraction allows the computation to be used in functions that may
109109-- perform other effects, and it also allows the effects to be handled in any
110110-- order.
111111newtype Eff (es :: [Effect]) a = Eff (Env es -> IO a)
112112 deriving (Monoid, Semigroup)
113113
114−-- | Run a pure 'Eff' operation.
114+-- | Run a pure 'Eff' computation.
115115--
116−-- For running operations with side effects see 'runEff'.
116+-- For running computations with side effects see 'runEff'.
117117runPureEff :: Eff '[] a -> a
118118runPureEff (Eff m) =
119119 -- unsafePerformIO is safe here since IOE was not on the stack, so no IO with
@@ -134,14 +134,14 @@ unEff (Eff m) = m
134134-- | Access the underlying 'IO' monad along with the environment.
135135--
136136-- This function is __unsafe__ because it can be used to introduce arbitrary
137−-- 'IO' actions into pure 'Eff' operations.
137+-- 'IO' actions into pure 'Eff' computations.
138138unsafeEff :: (Env es -> IO a) -> Eff es a
139139unsafeEff m = Eff (oneShot m)
140140
141141-- | Access the underlying 'IO' monad.
142142--
143143-- This function is __unsafe__ because it can be used to introduce arbitrary
144−-- 'IO' actions into pure 'Eff' operations.
144+-- 'IO' actions into pure 'Eff' computations.
145145unsafeEff_ :: IO a -> Eff es a
146146unsafeEff_ m = unsafeEff $ \_ -> m
147147
@@ -264,13 +264,13 @@ instance Fail :> es => MonadFail (Eff es) where
264264----------------------------------------
265265-- IO
266266
267−-- | Run arbitrary 'IO' operations via 'MonadIO' or 'MonadUnliftIO'.
267+-- | Run arbitrary 'IO' computations via 'MonadIO' or 'MonadUnliftIO'.
268268newtype IOE :: Effect where
269269 IOE :: UnliftStrategy -> IOE m r
270270
271−-- | Run an 'Eff' operation with side effects.
271+-- | Run an 'Eff' computation with side effects.
272272--
273−-- For running pure operations see 'runPureEff'.
273+-- For running pure computations see 'runPureEff'.
274274runEff :: Eff '[IOE] a -> IO a
275275runEff m = unEff (evalEffect (IdA (IOE SeqUnlift)) m) =<< emptyEnv
276276
@@ -300,7 +300,7 @@ instance IOE :> es => MonadBaseControl IO (Eff es) where
300300data Prim :: Effect where
301301 Prim :: Prim m r
302302
303−-- | Run an 'Eff' operation with primitive state-transformer actions.
303+-- | Run an 'Eff' computation with primitive state-transformer actions.
304304runPrim :: IOE :> es => Eff (Prim : es) a -> Eff es a
305305runPrim = evalEffect (IdA Prim)
306306
@@ -325,8 +325,8 @@ newtype LocalEnv (localEs :: [Effect]) (handlerEs :: [Effect]) = LocalEnv (Env l
325325type EffectHandler e es
326326 = forall a localEs. HasCallStack
327327 => LocalEnv localEs es
328− -- ^ Capture of the local environment for handling local 'Eff' operations when
329− -- @e@ is a higher order effect.
328+ -- ^ Capture of the local environment for handling local 'Eff' computations
329+ -- when @e@ is a higher order effect.
330330 -> e (Eff localEs) a
331331 -- ^ The effect performed in the local environment.
332332 -> Eff es a