monad-extras 0.5.4 → 0.5.5
raw patch · 2 files changed
+1/−28 lines, 2 files
Files
- Control/Monad/Extra.hs +0/−27
- monad-extras.cabal +1/−1
Control/Monad/Extra.hs view
@@ -1,6 +1,4 @@ {-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} @@ -8,9 +6,7 @@ import Control.Applicative import Control.Monad-import Control.Monad.Base import Control.Monad.IO.Class-import Control.Monad.Morph import Control.Monad.STM import Control.Monad.Trans.Cont import Control.Monad.Trans.Control@@ -213,26 +209,3 @@ as <- sequenceWhile p ms return (a:as) else return []---- | A type wrapper for composing monad transformers. This is very similar to--- 'Data.Functor.Compose', just one level up.-newtype ComposeT (f :: (* -> *) -> * -> *) (g :: (* -> *) -> * -> *) m a- = ComposeT { getComposeT :: f (g m) a }- deriving (Functor, Applicative, Monad, MonadIO)--instance (MFunctor f, MonadTrans f, MonadTrans g)- => MonadTrans (ComposeT f g) where- lift = ComposeT . hoist lift . lift--instance (MonadIO (f (g m)), Applicative (f (g m)))- => MonadBase IO (ComposeT f g m) where- liftBase = liftIO--instance (Applicative (f (g m)), MonadBaseControl IO (f (g m)),- MonadIO (f (g m)))- => MonadBaseControl IO (ComposeT f g m) where- newtype StM (ComposeT f g m) a = StMComposeT (StM (f (g m)) a)- liftBaseWith f =- ComposeT $ liftBaseWith $ \runInBase -> f $ \k ->- liftM StMComposeT $ runInBase $ getComposeT k- restoreM (StMComposeT m) = ComposeT . restoreM $ m
monad-extras.cabal view
@@ -1,5 +1,5 @@ name: monad-extras-version: 0.5.4+version: 0.5.5 synopsis: Extra utility functions for working with monads -- description: homepage: http://github.com/jwiegley/monad-extras