phantom-state 0.2.0.2 → 0.2.1.0
raw patch · 2 files changed
+8/−3 lines, 2 filesdep ~basedep ~transformersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, transformers
API changes (from Hackage documentation)
- Control.Applicative.PhantomState: instance Functor (PhantomStateT s m)
- Control.Applicative.PhantomState: instance Monad m => Applicative (PhantomStateT s m)
+ Control.Applicative.PhantomState: instance (GHC.Base.Monad m, GHC.Base.Alternative m) => GHC.Base.Alternative (Control.Applicative.PhantomState.PhantomStateT s m)
+ Control.Applicative.PhantomState: instance GHC.Base.Functor (Control.Applicative.PhantomState.PhantomStateT s m)
+ Control.Applicative.PhantomState: instance GHC.Base.Monad m => GHC.Base.Applicative (Control.Applicative.PhantomState.PhantomStateT s m)
Files
Control/Applicative/PhantomState.hs view
@@ -90,7 +90,7 @@ instance Monad m => Applicative (PhantomStateT s m) where {-# INLINE pure #-}- pure _ = PhantomStateT return+ pure _ = PhantomStateT pure {-# INLINE (<*>) #-} PhantomStateT f <*> PhantomStateT g = PhantomStateT (\x -> f x >>= g) {-# INLINE (*>) #-}@@ -98,3 +98,8 @@ {-# INLINE (<*) #-} PhantomStateT f <* PhantomStateT g = PhantomStateT (\x -> f x >>= g) +instance (Monad m, Alternative m) => Alternative (PhantomStateT s m) where+ {-# INLINE empty #-}+ empty = PhantomStateT (const empty)+ {-# INLINE (<|>) #-}+ PhantomStateT f <|> PhantomStateT g = PhantomStateT (\x -> f x <|> g x)
phantom-state.cabal view
@@ -1,5 +1,5 @@ name: phantom-state-version: 0.2.0.2+version: 0.2.1.0 synopsis: Phantom State Transformer. Like State Monad, but without values. description: A monad transformer that mimics the State Monad Transformer from the <http://hackage.haskell.org/package/transformers transformers> package,@@ -22,7 +22,7 @@ library exposed-modules: Control.Applicative.PhantomState build-depends: base == 4.*- , transformers >= 0.3 && < 0.5+ , transformers >= 0.3 && < 0.6 default-language: Haskell2010 ghc-options: -O2 -Wall