mirror of
https://github.com/haskell-effectful/effectful.git
synced 2024-11-23 22:44:14 +03:00
Haddock improvements
This commit is contained in:
parent
ae0a67f46f
commit
485e3e08f4
@ -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
|
||||
|
@ -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
|
||||
-- :}
|
||||
-- ...
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user