Skip to content

Commit

Permalink
release 1.6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Jul 12, 2021
1 parent 19acda0 commit 2ddc66b
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 13 deletions.
8 changes: 8 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions polysemy-plugin/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 0.4.0.0 (2021-07-12)

* Support GHC 9.0.1

## 0.3.0.0 (2021-03-30)
Expand Down
2 changes: 1 addition & 1 deletion polysemy-plugin/package.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion polysemy-plugin/polysemy-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/polysemy-research/polysemy/tree/master/polysemy-plugin#readme>
category: Polysemy
Expand Down
2 changes: 1 addition & 1 deletion polysemy.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Polysemy/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions src/Polysemy/Trace.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 #-}
Expand All @@ -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 #-}
Expand Down
1 change: 0 additions & 1 deletion test/FusionSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ddc66b

Please sign in to comment.