Skip to content
Browse files

Use IdentityT from mtl that I missed before

  • Loading branch information...
1 parent acbafee commit 32603170473d31d432b840d4a30a0765f4338145 @cdsmith committed Jun 9, 2012
Showing with 1 addition and 9 deletions.
  1. +1 −9 Pipes.hs
View
10 Pipes.hs
@@ -74,6 +74,7 @@ import Control.Category
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Trans.Either
+import Control.Monad.Trans.Identity
import Control.Monad.Trans.State
import Data.Monoid
import Data.Void
@@ -296,15 +297,6 @@ simulatePipe up down (Await f) = simulatePipe up down . f =<< up
simulatePipe up down (Do m) = lift m >>= simulatePipe up down
simulatePipe up down (Done x) = return x
-newtype IdentityT m a = IdentityT { runIdentityT :: m a }
-
-instance Monad m => Monad (IdentityT m) where
- return = IdentityT . return
- IdentityT m >>= f = IdentityT $ m >>= runIdentityT . f
-
-instance MonadTrans IdentityT where lift = IdentityT
-instance MonadIO m => MonadIO (IdentityT m) where liftIO = lift . liftIO
-
-- | Executes a complete pipeline, giving back the result. The upstream end is
-- fed an infinite stream of unit values, and the downstream end is set to Void
-- so that no yields are possible (except for bottoms, which will result in

0 comments on commit 3260317

Please sign in to comment.
Something went wrong with that request. Please try again.