freer-simple 1.2.1.0 → 1.2.1.1
raw patch · 5 files changed
+22/−13 lines, 5 filesdep ~template-haskellPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: template-haskell
API changes (from Hackage documentation)
- Control.Monad.Freer: class FindElem eff effs => Member (eff :: * -> *) effs
+ Control.Monad.Freer: class FindElem eff effs => Member (eff :: Type -> Type) effs
- Data.OpenUnion: class FindElem eff effs => Member (eff :: * -> *) effs
+ Data.OpenUnion: class FindElem eff effs => Member (eff :: Type -> Type) effs
- Data.OpenUnion: data Union (r :: [* -> *]) a
+ Data.OpenUnion: data Union (r :: [Type -> Type]) a
- Data.OpenUnion.Internal: class FindElem (t :: * -> *) (r :: [* -> *])
+ Data.OpenUnion.Internal: class FindElem (t :: Type -> Type) (r :: [Type -> Type])
- Data.OpenUnion.Internal: class IfNotFound (t :: * -> *) (r :: [* -> *]) (w :: [* -> *])
+ Data.OpenUnion.Internal: class IfNotFound (t :: Type -> Type) (r :: [Type -> Type]) (w :: [Type -> Type])
- Data.OpenUnion.Internal: class FindElem eff effs => Member (eff :: * -> *) effs
+ Data.OpenUnion.Internal: class FindElem eff effs => Member (eff :: Type -> Type) effs
- Data.OpenUnion.Internal: data Union (r :: [* -> *]) a
+ Data.OpenUnion.Internal: data Union (r :: [Type -> Type]) a
Files
- CHANGELOG.md +5/−0
- examples/src/Trace.hs +3/−5
- freer-simple.cabal +4/−4
- src/Control/Monad/Freer/Writer.hs +5/−0
- src/Data/OpenUnion/Internal.hs +5/−4
CHANGELOG.md view
@@ -1,3 +1,8 @@+# 1.2.1.1 (October 4th, 2019)++- Loosened bounds on `template-haskell` ([#29](https://github.com/lexi-lambda/freer-simple/issues/29)).+- Made some minor internal changes to better support GHC 8.8.+ # 1.2.1.0 (November 15th, 2018) - Improved `makeEffect` from `Control.Monad.Freer.TH` to support more datatypes ([#17](https://github.com/lexi-lambda/freer-simple/pull/17)).
examples/src/Trace.hs view
@@ -1,13 +1,11 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Trace (module Trace) where -import Control.Applicative ((<$>), (<*>), pure)-import Data.Function (($))-import Data.Int (Int)+#if !MIN_VERSION_base(4,11,0) import Data.Monoid ((<>))-import System.IO (IO)-import Text.Show (Show(show))+#endif import Control.Monad.Freer (Eff, Member) import Control.Monad.Freer.Reader (ask, runReader)
freer-simple.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.0.+-- This file has been generated from package.yaml by hpack version 0.31.2. -- -- see: https://github.com/sol/hpack ----- hash: 0ba678e5d0a715623f72dc54fdcfd0dae99df0524ca7b6538675b238e8fa7472+-- hash: e4aaad91d9a0583e046511c8522b9aec2a8612ad7929b48c2c3869ec6fd9fa6c name: freer-simple-version: 1.2.1.0+version: 1.2.1.1 synopsis: Implementation of a friendly effect system for Haskell. description: An implementation of an effect system for Haskell (a fork of <http://hackage.haskell.org/package/freer-effects freer-effects>), which is@@ -64,7 +64,7 @@ build-depends: base >=4.9 && <5 , natural-transformation >=0.2- , template-haskell >=2.11 && <2.15+ , template-haskell >=2.11 && <2.16 , transformers-base default-language: Haskell2010
src/Control/Monad/Freer/Writer.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ -- | -- Module: Control.Monad.Freer.Writer -- Description: Composable Writer effects.@@ -19,7 +21,10 @@ ) where import Control.Arrow (second)++#if !MIN_VERSION_base(4,11,0) import Data.Monoid ((<>))+#endif import Control.Monad.Freer.Internal (Eff, Member, handleRelay, send)
src/Data/OpenUnion/Internal.hs view
@@ -32,11 +32,12 @@ -- substitution for @Typeable@. module Data.OpenUnion.Internal where +import Data.Kind (Type) import GHC.TypeLits (TypeError, ErrorMessage(..)) import Unsafe.Coerce (unsafeCoerce) -- | Open union is a strong sum (existential with an evidence).-data Union (r :: [* -> *]) a where+data Union (r :: [Type -> Type]) a where Union :: {-# UNPACK #-} !Word -> t a -> Union r a -- | Takes a request of type @t :: * -> *@, and injects it into the 'Union'.@@ -76,7 +77,7 @@ -- prior to recursion, and it is used to produce better type errors. -- -- This is essentially a compile-time computation without run-time overhead.-class FindElem (t :: * -> *) (r :: [* -> *]) where+class FindElem (t :: Type -> Type) (r :: [Type -> Type]) where -- | Position of the element @t :: * -> *@ in a type list @r :: [* -> *]@. -- -- Position is computed during compilation, i.e. there is no run-time@@ -96,7 +97,7 @@ -- | Instance resolution for this class fails with a custom type error -- if @t :: * -> *@ is not in the list @r :: [* -> *]@.-class IfNotFound (t :: * -> *) (r :: [* -> *]) (w :: [* -> *])+class IfNotFound (t :: Type -> Type) (r :: [Type -> Type]) (w :: [Type -> Type]) -- | If we reach an empty list, that’s a failure, since it means the type isn’t -- in the list. For GHC >=8, we can render a custom type error that explicitly@@ -128,7 +129,7 @@ -- @ -- 'Member' ('Control.Monad.Freer.State.State' 'Integer') effs => 'Control.Monad.Freer.Eff' effs () -- @-class FindElem eff effs => Member (eff :: * -> *) effs where+class FindElem eff effs => Member (eff :: Type -> Type) effs where -- This type class is used for two following purposes: -- -- * As a @Constraint@ it guarantees that @t :: * -> *@ is a member of a