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