diff --git a/ChangeLog.md b/ChangeLog.md index 6fdfabb..9f997b7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,11 @@ # Changelog for polysemy +## 1.2.3.0 (2019-10-29) + +- Polysemy now works on GHC 8.8.1 (thanks to @googleson78 and @sevanspowell) +- Exported `MemberWithError` from `Polysemy` +- Added `rewrite` and `transform` interpretation combinators + ## 1.2.2.0 (2019-10-22) - Fixed a bug in `resourceToIO` and `resourceToIOFinal` that prevented the diff --git a/package.yaml b/package.yaml index c89defb..2f57f0a 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: polysemy -version: 1.2.2.0 +version: 1.2.3.0 github: "isovector/polysemy" license: BSD3 author: "Sandy Maguire" diff --git a/polysemy.cabal b/polysemy.cabal index a13bb05..0db8b72 100644 --- a/polysemy.cabal +++ b/polysemy.cabal @@ -4,10 +4,10 @@ cabal-version: 1.24 -- -- see: https://github.com/sol/hpack -- --- hash: 40cf5370ccedc20b00b7927a7819a5f6a1e72b13996840d9c1670488facd29c1 +-- hash: 5fb909edb732407e798db0fa3e2e0a62dbeb807e960b77564b99b34a3235fdb3 name: polysemy -version: 1.2.2.0 +version: 1.2.3.0 synopsis: Higher-order, low-boilerplate, zero-cost free monads. description: Please see the README on GitHub at category: Language diff --git a/src/Polysemy.hs b/src/Polysemy.hs index 4075c31..d5c5b6c 100644 --- a/src/Polysemy.hs +++ b/src/Polysemy.hs @@ -99,6 +99,8 @@ module Polysemy , reinterpret , reinterpret2 , reinterpret3 + , rewrite + , transform -- * Combinators for Interpreting Higher-Order Effects , interpretH diff --git a/src/Polysemy/Internal/Combinators.hs b/src/Polysemy/Internal/Combinators.hs index 5aaf65d..858df1b 100644 --- a/src/Polysemy/Internal/Combinators.hs +++ b/src/Polysemy/Internal/Combinators.hs @@ -292,6 +292,8 @@ interceptH f (Sem m) = Sem $ \k -> m $ \u -> ------------------------------------------------------------------------------ -- | Rewrite an effect @e1@ directly into @e2@, and put it on the top of the -- effect stack. +-- +-- @since 1.2.3.0 rewrite :: forall e1 e2 r a . (forall m x. e1 m x -> e2 m x) @@ -306,6 +308,8 @@ rewrite f (Sem m) = Sem $ \k -> m $ \u -> ------------------------------------------------------------------------------ -- | Transform an effect @e1@ into an effect @e2@ that is already somewhere -- inside of the stack. +-- +-- @since 1.2.3.0 transform :: forall e1 e2 r a . Member e2 r