packages feed

mmorph 1.0.1 → 1.0.2

raw patch · 3 files changed

+10/−7 lines, 3 files

Files

mmorph.cabal view
@@ -1,5 +1,5 @@ Name: mmorph-Version: 1.0.1+Version: 1.0.2 Cabal-Version: >= 1.8.0.2 Build-Type: Simple License: BSD3
src/Control/Monad/Morph.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP, RankNTypes #-}+ {-| A monad morphism is a natural transformation:  > morph :: forall a . m a -> n a@@ -41,8 +43,6 @@  -} -{-# LANGUAGE Rank2Types #-}- module Control.Monad.Morph (     -- * Functors over Monads     MFunctor(..),@@ -72,8 +72,6 @@     -- $embed     ) where -import Control.Applicative.Lift (Lift (Pure, Other))-import Control.Applicative.Backwards (Backwards (Backwards)) import Control.Monad.Trans.Class (MonadTrans(lift)) import qualified Control.Monad.Trans.Error         as E import qualified Control.Monad.Trans.Identity      as I@@ -90,6 +88,10 @@ import Data.Functor.Compose (Compose (Compose)) import Data.Functor.Identity (runIdentity) import Data.Functor.Product (Product (Pair))+#if MIN_VERSION_transformers(0,3,0)+import Control.Applicative.Backwards (Backwards (Backwards))+import Control.Applicative.Lift (Lift (Pure, Other))+#endif  -- For documentation import Control.Exception (try, IOException)@@ -147,12 +149,14 @@ instance MFunctor (Product f) where     hoist nat (Pair f g) = Pair f (nat g) +#if MIN_VERSION_transformers(0,3,0) instance MFunctor Backwards where     hoist nat (Backwards f) = Backwards (nat f)  instance MFunctor Lift where     hoist _   (Pure a)  = Pure a     hoist nat (Other f) = Other (nat f)+#endif  -- | A function that @generalize@s the 'Identity' base monad to be any monad. generalize :: Monad m => Identity a -> m a
src/Control/Monad/Trans/Compose.hs view
@@ -1,5 +1,4 @@-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE KindSignatures #-}+{-# LANGUAGE FlexibleContexts, KindSignatures #-}  {-| Composition of monad transformers. A higher-order version of     "Data.Functor.Compose".