Skip to content
Browse files

Use the Identity type from transformers

  • Loading branch information...
1 parent 97dda0d commit 18daad400020f8ba6ee569b001a7b530e27481b7 @basvandijk basvandijk committed Mar 4, 2012
Showing with 2 additions and 6 deletions.
  1. +1 −5 Control/Monad/Exception/Base.hs
  2. +1 −1 control-monad-exception.cabal
View
6 Control/Monad/Exception/Base.hs
@@ -53,6 +53,7 @@ import Control.Monad.Trans.Class
import Control.Failure
import Control.Monad.Fix
import Data.Typeable
+import Data.Functor.Identity
import Prelude hiding (catch)
type CallTrace = [String]
@@ -234,11 +235,6 @@ runEM = runIdentity . runEMT
runEMParanoid :: EM ParanoidMode a -> a
runEMParanoid = runIdentity . runEMTParanoid
-newtype Identity a = Identity{runIdentity::a} deriving (Eq, Ord, Show)
-instance Monad Identity where
- return = Identity
- Identity a >>= f = f a
-
instance (Throws MonadZeroException l) => MonadPlus (EM l) where
mzero = throw MonadZeroException
mplus = mplusDefault
View
2 control-monad-exception.cabal
@@ -80,7 +80,7 @@ Flag extensibleExceptions
Library
buildable: True
build-depends: failure >= 0.1 && < 0.3
- , transformers
+ , transformers >= 0.2
, monadloc
if flag(extensibleExceptions)

0 comments on commit 18daad4

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