From 2ddc66bc7813bbbc707efa3bc22e64310d6ec793 Mon Sep 17 00:00:00 2001 From: Torsten Schmits Date: Fri, 25 Jun 2021 21:58:30 +0200 Subject: [PATCH] release 1.6.0.0 --- ChangeLog.md | 8 ++++++++ README.md | 6 +++--- package.yaml | 2 +- polysemy-plugin/ChangeLog.md | 2 ++ polysemy-plugin/package.yaml | 2 +- polysemy-plugin/polysemy-plugin.cabal | 2 +- polysemy.cabal | 2 +- src/Polysemy/Internal.hs | 4 ++-- src/Polysemy/Trace.hs | 6 +++--- test/FusionSpec.hs | 1 - 10 files changed, 22 insertions(+), 13 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 126143c..76b8be7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,9 +2,17 @@ ## Unreleased +## 1.6.0.0 (2021-07-12) + +### Breaking Changes + * Deprecate `traceToIO` and replace it with `traceToStdout` and `traceToStderr` * Support GHC 9.0.1 + +### Other Changes + * Added the combinator `insertAt`, which allows adding effects at a specified index into the effect stack +* Added `Semigroup` and `Monoid` for `Sem` ## 1.5.0.0 (2021-03-30) diff --git a/README.md b/README.md index 61e1246..b30d9fc 100644 --- a/README.md +++ b/README.md @@ -300,15 +300,15 @@ Luckily, the same person that uncovered this problems proposed a [solution](https://github.com/lexi-lambda/ghc-proposals/blob/delimited-continuation-primops/proposals/0000-delimited-continuation-primops.md) - set of primops that will allow interpretation of effects at runtime, with minimal overhead. It's not *zero-cost* as we hoped for with `polysemy` at -first, but it should have negligible effect on performance in real life and +first, but it should have negligible effect on performance in real life and compared to current solutions, it should be much more predictable and even resolve some problems with behaviour of [specific effects](https://github.com/polysemy-research/polysemy/issues/246). You can try out experimental library that uses proposed features [here](https://github.com/hasura/eff). -When it comes to `polysemy`, once GHC proposal lands, we consider option of -switching to implementation based on it. This will probably require some +When it comes to `polysemy`, once GHC proposal lands, we will consider the option of +switching to an implementation based on it. This will probably require some breaking changes, but should resolve performance issues and maybe even make implementation of higher-order effects easier. diff --git a/package.yaml b/package.yaml index fed00ca..4f7b52f 100644 --- a/package.yaml +++ b/package.yaml @@ -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" diff --git a/polysemy-plugin/ChangeLog.md b/polysemy-plugin/ChangeLog.md index d0a22dc..43e4370 100644 --- a/polysemy-plugin/ChangeLog.md +++ b/polysemy-plugin/ChangeLog.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.4.0.0 (2021-07-12) + * Support GHC 9.0.1 ## 0.3.0.0 (2021-03-30) diff --git a/polysemy-plugin/package.yaml b/polysemy-plugin/package.yaml index c0efc3c..867d52f 100644 --- a/polysemy-plugin/package.yaml +++ b/polysemy-plugin/package.yaml @@ -1,5 +1,5 @@ name: polysemy-plugin -version: 0.3.0.0 +version: 0.4.0.0 github: "polysemy-research/polysemy" license: BSD3 author: "Sandy Maguire" diff --git a/polysemy-plugin/polysemy-plugin.cabal b/polysemy-plugin/polysemy-plugin.cabal index fdba509..699d601 100644 --- a/polysemy-plugin/polysemy-plugin.cabal +++ b/polysemy-plugin/polysemy-plugin.cabal @@ -5,7 +5,7 @@ cabal-version: 2.0 -- see: https://github.com/sol/hpack name: polysemy-plugin -version: 0.3.0.0 +version: 0.4.0.0 synopsis: Disambiguate obvious uses of effects. description: Please see the README on GitHub at category: Polysemy diff --git a/polysemy.cabal b/polysemy.cabal index 55370ca..f36f4ac 100644 --- a/polysemy.cabal +++ b/polysemy.cabal @@ -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 category: Language diff --git a/src/Polysemy/Internal.hs b/src/Polysemy/Internal.hs index ca7b6b0..de0f08c 100644 --- a/src/Polysemy/Internal.hs +++ b/src/Polysemy/Internal.hs @@ -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 diff --git a/src/Polysemy/Trace.hs b/src/Polysemy/Trace.hs index b7eec59..e27b603 100644 --- a/src/Polysemy/Trace.hs +++ b/src/Polysemy/Trace.hs @@ -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 #-} diff --git a/test/FusionSpec.hs b/test/FusionSpec.hs index 0d1dced..db396d1 100644 --- a/test/FusionSpec.hs +++ b/test/FusionSpec.hs @@ -36,7 +36,6 @@ spec :: Spec spec = parallel $ do describe "fusion" $ do -- #if __GLASGOW_HASKELL__ >= 807 --- -- TODO: Investigate why this test fails mysteriously on GHC < 8.6 -- it "Union proofs should simplify" $ do -- shouldSucceed $(inspectTest $ 'countDown `hasNoType` ''SNat) -- #endif