@@ -129,14 +129,14 @@ localUnliftIO (LocalEnv les) strategy k = case strategy of
129-- /Note:/ the operation must not run its argument in a separate thread,
129-- /Note:/ the operation must not run its argument in a separate thread,
130-- attempting to do so will result in a runtime error.
130-- attempting to do so will result in a runtime error.
131withLiftMap
131withLiftMap
132− :: (HasCallStack, IOE :> es)
132+ :: HasCallStack
133 => ((forall a b localEs. (Eff es a -> Eff es b) -> Eff localEs a -> Eff localEs b) -> Eff es r)
133 => ((forall a b localEs. (Eff es a -> Eff es b) -> Eff localEs a -> Eff localEs b) -> Eff es r)
134 -- ^ Continuation with the lifting function in scope.
134 -- ^ Continuation with the lifting function in scope.
135 -> Eff es r
135 -> Eff es r
136withLiftMap k = unsafeEff $ \es -> do
136withLiftMap k = unsafeEff $ \es -> do
137 (`unEff` es) $ k $ \mapEff m -> unsafeEff $ \localEs -> do
137 (`unEff` es) $ k $ \mapEff m -> unsafeEff $ \localEs -> do
138 seqUnliftEff localEs $ \unlift -> do
138 seqUnliftEff localEs $ \unlift -> do
139− (`unEff` es) . mapEff . liftIO $ unlift m
139+ (`unEff` es) . mapEff . unsafeEff_ $ unlift m
141-- | Utility for lifting 'IO' operations of type
141-- | Utility for lifting 'IO' operations of type
@@ -182,7 +182,7 @@ withLiftMapIO k = k $ \mapIO m -> unsafeEff $ \es -> do
182-- /Note:/ depending on the operation you're lifting 'localUnlift' along with
182-- /Note:/ depending on the operation you're lifting 'localUnlift' along with
183-- 'withLiftMap' might be enough and is more efficient.
183-- 'withLiftMap' might be enough and is more efficient.
184localLiftUnlift
184localLiftUnlift
185− :: (HasCallStack, IOE :> es)
185+ :: HasCallStack
186 => LocalEnv localEs
186 => LocalEnv localEs
187 -- ^ Local environment.
187 -- ^ Local environment.
188 -> UnliftStrategy
188 -> UnliftStrategy
@@ -193,11 +193,11 @@ localLiftUnlift (LocalEnv les) strategy k = case strategy of
193 SeqUnlift -> unsafeEff $ \es -> do
193 SeqUnlift -> unsafeEff $ \es -> do
194 seqUnliftEff es $ \unliftEs -> do
194 seqUnliftEff es $ \unliftEs -> do
195 seqUnliftEff les $ \unliftLocalEs -> do
195 seqUnliftEff les $ \unliftLocalEs -> do
196− (`unEff` es) $ k (unsafeEff_ . unliftEs) (liftIO . unliftLocalEs)
196+ (`unEff` es) $ k (unsafeEff_ . unliftEs) (unsafeEff_ . unliftLocalEs)
197 ConcUnlift p l -> unsafeEff $ \es -> do
197 ConcUnlift p l -> unsafeEff $ \es -> do
198 concUnliftEff es p l $ \unliftEs -> do
198 concUnliftEff es p l $ \unliftEs -> do
199 concUnliftEff les p l $ \unliftLocalEs -> do
199 concUnliftEff les p l $ \unliftLocalEs -> do
200− (`unEff` es) $ k (unsafeEff_ . unliftEs) (liftIO . unliftLocalEs)
200+ (`unEff` es) $ k (unsafeEff_ . unliftEs) (unsafeEff_ . unliftLocalEs)
202-- | Create a local unlifting function with the given strategy along with an
202-- | Create a local unlifting function with the given strategy along with an
203-- unrestricted lifting function.
203-- unrestricted lifting function.