mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-12-25 06:53:50 +03:00
release 1.6.0.0
This commit is contained in:
parent
19acda0450
commit
2ddc66bc78
@ -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)
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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"
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 0.4.0.0 (2021-07-12)
|
||||
|
||||
* Support GHC 9.0.1
|
||||
|
||||
## 0.3.0.0 (2021-03-30)
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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 #-}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user