diff --git a/effectful-core/src/Effectful.hs b/effectful-core/src/Effectful.hs index 38a3af4..282980c 100644 --- a/effectful-core/src/Effectful.hs +++ b/effectful-core/src/Effectful.hs @@ -18,9 +18,13 @@ module Effectful , runPureEff -- ** Computations with side effects - , IOE , runEff + -- *** Integration with the 'IO' monad + , IOE + , MonadIO(..) + , MonadUnliftIO(..) + -- ** Unlift strategies , UnliftStrategy(..) , Persistence(..) @@ -28,10 +32,6 @@ module Effectful , unliftStrategy , withUnliftStrategy , withEffToIO - - -- * Re-exports - , MonadIO(..) - , MonadUnliftIO(..) ) where import Control.Monad.IO.Class diff --git a/effectful-core/src/Effectful/Dispatch/Dynamic.hs b/effectful-core/src/Effectful/Dispatch/Dynamic.hs index 4ba41e3..e8fabc9 100644 --- a/effectful-core/src/Effectful/Dispatch/Dynamic.hs +++ b/effectful-core/src/Effectful/Dispatch/Dynamic.hs @@ -214,7 +214,7 @@ import Effectful.Internal.Monad -- t1 <- liftIO getMonotonicTime -- r <- action -- t2 <- liftIO getMonotonicTime --- liftIO . putStrLn $ label ++ "' took " ++ show (t2 - t1) ++ " seconds" +-- liftIO . putStrLn $ "Action '" ++ label ++ "' took " ++ show (t2 - t1) ++ " seconds." -- pure r -- :} -- ... diff --git a/effectful-core/src/Effectful/Internal/Monad.hs b/effectful-core/src/Effectful/Internal/Monad.hs index 31a02ca..53f597c 100644 --- a/effectful-core/src/Effectful/Internal/Monad.hs +++ b/effectful-core/src/Effectful/Internal/Monad.hs @@ -161,9 +161,9 @@ withUnliftStrategy unlift = localStaticRep $ \_ -> IOE unlift -- | Create an unlifting function with the current 'UnliftStrategy'. -- --- This function is equivalent to 'withRunInIO', but has a 'HasCallStack' --- constraint for accurate stack traces in case an insufficiently powerful --- 'UnliftStrategy' is used and the unlifting function fails. +-- This function is equivalent to 'Effectful.withRunInIO', but has a +-- 'HasCallStack' constraint for accurate stack traces in case an insufficiently +-- powerful 'UnliftStrategy' is used and the unlifting function fails. -- -- /Note:/ the strategy is reset to 'SeqUnlift' inside the continuation. withEffToIO @@ -295,7 +295,7 @@ instance IOE :> es => MonadBase IO (Eff es) where liftBase = unsafeEff_ -- | Instance included for compatibility with existing code, usage of --- 'withRunInIO' is preferrable. +-- 'Effectful.withRunInIO' is preferrable. instance IOE :> es => MonadBaseControl IO (Eff es) where type StM (Eff es) a = a liftBaseWith = withEffToIO diff --git a/effectful-core/src/Effectful/Internal/Unlift.hs b/effectful-core/src/Effectful/Internal/Unlift.hs index 62a5f07..c63f816 100644 --- a/effectful-core/src/Effectful/Internal/Unlift.hs +++ b/effectful-core/src/Effectful/Internal/Unlift.hs @@ -36,7 +36,7 @@ import Effectful.Internal.Utils -- Unlift strategies -- | The strategy to use when unlifting 'Effectful.Eff' computations via --- 'withRunInIO', 'Effectful.withEffToIO' or the +-- 'Effectful.withRunInIO', 'Effectful.withEffToIO' or the -- 'Effectful.Dispatch.Dynamic.localUnlift' family. data UnliftStrategy = SeqUnlift