From 4f96a523da4e0a09e9112a07e629573b12bb3466 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 10 Oct 2016 12:36:09 +0100 Subject: [PATCH] AMP fallout compatability fix. --- src/Exceptions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exceptions.hs b/src/Exceptions.hs index ec77b1f43..ec629e2f0 100644 --- a/src/Exceptions.hs +++ b/src/Exceptions.hs @@ -21,7 +21,7 @@ hush :: Alternative m => Either e a -> m a hush (Left _) = empty hush (Right x) = pure x -note :: (MonadError e m) => e -> Maybe a -> m a +note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a note err = maybe (throwError err) pure tryIO :: MonadIO m => IO a -> ExceptT IOException m a