packages feed

reflection-without-remorse 0.9.3 → 0.9.4

raw patch · 3 files changed

+14/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog view
@@ -1,3 +1,4 @@+0.9.4: Added utility functions to Operational monad 0.9.3: Added applicative and functor instances 0.9.2: Fixed stupid spelling error 0.9.1: Small docs fix
Control/Monad/Operational/Reflectable.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE ExistentialQuantification,GADTs #-}+{-# LANGUAGE ExistentialQuantification,GADTs,Rank2Types #-}   -----------------------------------------------------------------------------@@ -49,6 +49,17 @@ instance Monad (Program r) where   return = fromView . Return   (Program t s) >>= f = Program t (s |> TC f)++instr :: r x -> Program r x+instr r = fromView $ Bind r return++interpretWithMonad :: Monad m => (forall a. r a -> m a) -> Program r b -> m b+interpretWithMonad f = loop where +  loop m = case toView m of+       Return x -> return x+       Bind i c -> f i >>= loop . c+ +  instance Functor (Program r) where   fmap = liftM
reflection-without-remorse.cabal view
@@ -1,5 +1,5 @@ Name:                reflection-without-remorse-Version:             0.9.3+Version:             0.9.4 Synopsis:	         Efficient free and operational monads. Description:         Free and operational monad that efficiently support alternating between building and observing. License:             BSD3