Haddock improvements

This commit is contained in:
Andrzej Rybczak 2022-02-01 13:44:11 +01:00
parent ae0a67f46f
commit 485e3e08f4
4 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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
-- :}
-- ...

View File

@ -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

View File

@ -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