lambdabot-core 5.3 → 5.3.0.1
raw patch · 4 files changed
+24/−12 lines, 4 filesdep +exceptionsdep ~dependent-mapdep ~haskelinePVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependencies added: exceptions
Dependency ranges changed: dependent-map, haskeline
API changes (from Hackage documentation)
+ Lambdabot.Module: instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Lambdabot.Module.ModuleT st m)
+ Lambdabot.Module: instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (Lambdabot.Module.ModuleT st m)
+ Lambdabot.Module: instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Lambdabot.Module.ModuleT st m)
+ Lambdabot.Monad: instance Control.Monad.Catch.MonadCatch Lambdabot.Monad.LB
+ Lambdabot.Monad: instance Control.Monad.Catch.MonadMask Lambdabot.Monad.LB
+ Lambdabot.Monad: instance Control.Monad.Catch.MonadThrow Lambdabot.Monad.LB
Files
- lambdabot-core.cabal +5/−4
- src/Lambdabot/Module.hs +9/−1
- src/Lambdabot/Monad.hs +10/−2
- src/Lambdabot/Monad.hs-boot +0/−5
lambdabot-core.cabal view
@@ -1,5 +1,5 @@ name: lambdabot-core-version: 5.3+version: 5.3.0.1 license: GPL license-file: LICENSE@@ -19,7 +19,7 @@ build-type: Simple cabal-version: >= 1.10-tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.3+tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1 extra-source-files: AUTHORS.md COMMENTARY.md@@ -72,13 +72,14 @@ binary >= 0.5, bytestring >= 0.9, containers >= 0.4,- dependent-map >= 0.2 && < 0.4,+ dependent-map >= 0.2 && < 0.5, dependent-sum >= 0.7 && < 0.8, dependent-sum-template >= 0.1.0.2 && < 0.2, directory >= 1.1, edit-distance >= 0.2,+ exceptions >= 0.10 && < 0.11, filepath >= 1.3,- haskeline >= 0.7 && < 0.8,+ haskeline >= 0.7 && < 0.9, hslogger >= 1.2.1, HTTP >= 4000, lifted-base >= 0.2,
src/Lambdabot/Module.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -31,7 +32,10 @@ import Control.Monad.Trans (MonadTrans(..), MonadIO(..)) import Control.Monad.Trans.Control import Data.Unique.Tag+import Control.Monad.Catch (MonadThrow, MonadCatch, MonadMask)+#if !defined(MIN_VERSION_haskeline) || !MIN_VERSION_haskeline(0,8,0) import System.Console.Haskeline.MonadException (MonadException)+#endif ------------------------------------------------------------------------ @@ -101,7 +105,11 @@ -- need to access its name or its state. newtype ModuleT st m a = ModuleT { unModuleT :: ReaderT (ModuleInfo st) m a } deriving (Applicative, Functor, Monad, MonadReader (ModuleInfo st), - MonadTrans, MonadIO, MonadException, MonadConfig, MonadFail)+ MonadTrans, MonadIO, MonadConfig, MonadFail,+#if !defined(MIN_VERSION_haskeline) || !MIN_VERSION_haskeline(0,8,0)+ MonadException,+#endif+ MonadThrow, MonadCatch, MonadMask) runModuleT :: ModuleT st m a -> ModuleInfo st -> m a runModuleT = runReaderT . unModuleT
src/Lambdabot/Monad.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-}@@ -73,7 +74,10 @@ import Data.Some import qualified Data.Map as M import qualified Data.Set as S+import Control.Monad.Catch (MonadThrow, MonadCatch, MonadMask)+#if !defined(MIN_VERSION_haskeline) || !MIN_VERSION_haskeline(0,8,0) import System.Console.Haskeline.MonadException (MonadException)+#endif ------------------------------------------------------------------------ --@@ -88,7 +92,7 @@ } -- | Default ro state-initRoState :: [D.DSum Config Identity] -> IO IRCRState+initRoState :: [DSum Config Identity] -> IO IRCRState initRoState configuration = do quitMVar <- newEmptyMVar initDoneMVar <- newEmptyMVar@@ -170,7 +174,11 @@ -- instances Monad, Functor, MonadIO, MonadState, MonadError newtype LB a = LB { unLB :: ReaderT (IRCRState, IORef IRCRWState) IO a }- deriving (Functor, Applicative, Monad, MonadIO, MonadException, MonadFail)+ deriving (Functor, Applicative, Monad, MonadIO, MonadFail,+#if !defined(MIN_VERSION_haskeline) || !MIN_VERSION_haskeline(0,8,0)+ MonadException,+#endif+ MonadThrow, MonadCatch, MonadMask) runLB :: LB a -> (IRCRState, IORef IRCRWState) -> IO a runLB = runReaderT . unLB
src/Lambdabot/Monad.hs-boot view
@@ -1,15 +1,10 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-}-#if __GLASGOW_HASKELL__ > 706 {-# LANGUAGE RoleAnnotations #-}-#endif module Lambdabot.Monad where import Control.Applicative -#if __GLASGOW_HASKELL__ > 706 type role LB nominal-#endif data LB a instance Applicative LB instance Functor LB