mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-11-25 23:05:02 +03:00
release 1.6.0.0
This commit is contained in:
parent
19acda0450
commit
b717dee493
@ -1,5 +1,5 @@
|
||||
name: polysemy
|
||||
version: 1.5.0.0
|
||||
version: 1.6.0.0
|
||||
github: "polysemy-research/polysemy"
|
||||
license: BSD3
|
||||
author: "Sandy Maguire"
|
||||
|
@ -5,7 +5,7 @@ cabal-version: 2.0
|
||||
-- see: https://github.com/sol/hpack
|
||||
|
||||
name: polysemy
|
||||
version: 1.5.0.0
|
||||
version: 1.6.0.0
|
||||
synopsis: Higher-order, low-boilerplate free monads.
|
||||
description: Please see the README on GitHub at <https://github.com/polysemy-research/polysemy#readme>
|
||||
category: Language
|
||||
|
@ -313,11 +313,11 @@ instance (Member Fail r) => MonadFail (Sem r) where
|
||||
fail = send . Fail
|
||||
{-# INLINE fail #-}
|
||||
|
||||
-- | @since TODO
|
||||
-- | @since 1.6.0.0
|
||||
instance Semigroup a => Semigroup (Sem f a) where
|
||||
(<>) = liftA2 (<>)
|
||||
|
||||
-- | @since TODO
|
||||
-- | @since 1.6.0.0
|
||||
instance Monoid a => Monoid (Sem f a) where
|
||||
mempty = pure mempty
|
||||
|
||||
|
@ -36,7 +36,7 @@ makeSem ''Trace
|
||||
------------------------------------------------------------------------------
|
||||
-- | Run a 'Trace' effect by printing the messages to the provided 'Handle'.
|
||||
--
|
||||
-- @since TODO
|
||||
-- @since 1.6.0.0
|
||||
traceToHandle :: Member (Embed IO) r => Handle -> Sem (Trace ': r) a -> Sem r a
|
||||
traceToHandle handle = interpret $ \case
|
||||
Trace m -> embed $ hPutStrLn handle m
|
||||
@ -46,7 +46,7 @@ traceToHandle handle = interpret $ \case
|
||||
------------------------------------------------------------------------------
|
||||
-- | Run a 'Trace' effect by printing the messages to stdout.
|
||||
--
|
||||
-- @since TODO
|
||||
-- @since 1.6.0.0
|
||||
traceToStdout :: Member (Embed IO) r => Sem (Trace ': r) a -> Sem r a
|
||||
traceToStdout = traceToHandle stdout
|
||||
{-# INLINE traceToStdout #-}
|
||||
@ -55,7 +55,7 @@ traceToStdout = traceToHandle stdout
|
||||
------------------------------------------------------------------------------
|
||||
-- | Run a 'Trace' effect by printing the messages to stderr.
|
||||
--
|
||||
-- @since TODO
|
||||
-- @since 1.6.0.0
|
||||
traceToStderr :: Member (Embed IO) r => Sem (Trace ': r) a -> Sem r a
|
||||
traceToStderr = traceToHandle stderr
|
||||
{-# INLINE traceToStderr #-}
|
||||
|
Loading…
Reference in New Issue
Block a user