Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling with exceptions 0.6 #38

Closed
magthe opened this issue May 5, 2014 · 2 comments
Closed

Compiling with exceptions 0.6 #38

magthe opened this issue May 5, 2014 · 2 comments

Comments

@magthe
Copy link

magthe commented May 5, 2014

Compiling with exceptions 0.6 fails. This seems to fix it:

Index: habs/haskell-monad-logger/src/monad-logger-0.3.6/Control/Monad/Logger.hs
===================================================================
--- habs.orig/haskell-monad-logger/src/monad-logger-0.3.6/Control/Monad/Logger.hs
+++ habs/haskell-monad-logger/src/monad-logger-0.3.6/Control/Monad/Logger.hs
@@ -86,7 +86,7 @@ import Control.Monad.IO.Class (MonadIO (
 import Control.Monad.Trans.Resource (MonadResource (liftResourceT), MonadThrow, monadThrow)
 #if MIN_VERSION_resourcet(1,1,0)
 import Control.Monad.Trans.Resource (throwM)
-import Control.Monad.Catch (MonadCatch (..))
+import Control.Monad.Catch (MonadCatch (..), MonadMask (..))
 #endif

 import Control.Monad.Trans.Identity ( IdentityT)
@@ -276,6 +276,8 @@ instance MonadThrow m => MonadThrow (NoL
 instance MonadCatch m => MonadCatch (NoLoggingT m) where
     catch (NoLoggingT m) c =
         NoLoggingT $ m `catch` \e -> runNoLoggingT (c e)
+
+instance MonadMask m => MonadMask (NoLoggingT m) where
     mask a = NoLoggingT $ mask $ \u -> runNoLoggingT (a $ q u)
       where q u (NoLoggingT b) = NoLoggingT $ u b
     uninterruptibleMask a =
@@ -347,6 +349,7 @@ instance MonadThrow m => MonadThrow (Log
 instance MonadCatch m => MonadCatch (LoggingT m) where
   catch (LoggingT m) c =
       LoggingT $ \r -> m r `catch` \e -> runLoggingT (c e) r
+instance MonadMask m => MonadMask (LoggingT m) where
   mask a = LoggingT $ \e -> mask $ \u -> runLoggingT (a $ q u) e
     where q u (LoggingT b) = LoggingT (u . b)
   uninterruptibleMask a =
snoyberg added a commit that referenced this issue May 5, 2014
@snoyberg
Copy link
Collaborator

snoyberg commented May 5, 2014

Thanks for catching these! It should be fixed now on Hackage.

@magthe
Copy link
Author

magthe commented May 5, 2014

Excellent. Thanks for the extreme speed of fixing and pushing it to Hackage.

@magthe magthe closed this as completed May 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants