reflection-without-remorse 0.9.2 → 0.9.3
raw patch · 4 files changed
+19/−1 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Control.Monad.Free.Reflectable: instance Applicative (FreeMonad f)
+ Control.Monad.Free.Reflectable: instance Functor (FreeMonad f)
+ Control.Monad.Operational.Reflectable: instance Applicative (Program r)
+ Control.Monad.Operational.Reflectable: instance Functor (Program r)
Files
- ChangeLog +1/−0
- Control/Monad/Free/Reflectable.hs +8/−0
- Control/Monad/Operational/Reflectable.hs +9/−0
- reflection-without-remorse.cabal +1/−1
ChangeLog view
@@ -1,3 +1,4 @@+0.9.3: Added applicative and functor instances 0.9.2: Fixed stupid spelling error 0.9.1: Small docs fix 0.9: Initial version
Control/Monad/Free/Reflectable.hs view
@@ -21,6 +21,8 @@ module Control.Monad.Free.Reflectable(FreeMonadView(..),FreeMonad, fromView,toView) where import Data.TASequence.FastCatQueue+import Control.Monad+import Control.Applicative newtype FC f a b = FC (a -> FreeMonad f b) type FMExp f a b = FastTCQueue (FC f) a b@@ -44,4 +46,10 @@ return = fromView . Pure (FM m r) >>= f = FM m (r >< tsingleton (FC f)) +instance Functor (FreeMonad f) where+ fmap = liftM++instance Applicative (FreeMonad f) where+ pure = return+ (<*>) = ap
Control/Monad/Operational/Reflectable.hs view
@@ -22,6 +22,8 @@ module Control.Monad.Operational.Reflectable(Program,ProgramView(..), fromView, toView) where import Data.TASequence.FastCatQueue+import Control.Monad+import Control.Applicative newtype TermMCont r a b = TC (a -> Program r b) type TermCExp r a b = FastTCQueue (TermMCont r) a b@@ -47,3 +49,10 @@ instance Monad (Program r) where return = fromView . Return (Program t s) >>= f = Program t (s |> TC f)++instance Functor (Program r) where+ fmap = liftM++instance Applicative (Program r) where+ pure = return+ (<*>) = ap
reflection-without-remorse.cabal view
@@ -1,5 +1,5 @@ Name: reflection-without-remorse-Version: 0.9.2+Version: 0.9.3 Synopsis: Efficient free and operational monads. Description: Free and operational monad that efficiently support alternating between building and observing. License: BSD3