Skip to content
Snippets Groups Projects
Commit b3334f9b authored by Edward Kmett's avatar Edward Kmett
Browse files

Merge pull request #49 from hvr/pr/canonical-amp-instances

canonical-AMP-warning avoidance
parents 7fe5223b 2651842f
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,7 @@ instance Monad m => Applicative (CatchT m) where ...@@ -105,7 +105,7 @@ instance Monad m => Applicative (CatchT m) where
(<*>) = ap (<*>) = ap
instance Monad m => Monad (CatchT m) where instance Monad m => Monad (CatchT m) where
return a = CatchT (return (Right a)) return = pure
CatchT m >>= k = CatchT $ m >>= \ea -> case ea of CatchT m >>= k = CatchT $ m >>= \ea -> case ea of
Left e -> return (Left e) Left e -> return (Left e)
Right a -> runCatchT (k a) Right a -> runCatchT (k a)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment