invertible-grammar 0.1.3.2 → 0.1.3.3
raw patch · 2 files changed
+12/−11 lines, 2 filesdep ~mtlPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: mtl
API changes (from Hackage documentation)
Files
invertible-grammar.cabal view
@@ -1,5 +1,5 @@ name: invertible-grammar-version: 0.1.3.2+version: 0.1.3.3 license: BSD3 license-file: LICENSE author: Yevhen Smolanka, Sergey Vinokurov@@ -14,7 +14,7 @@ description: Grammar combinator framework to build invertible parsing libraries for concrete syntax.-tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.5+tested-with: GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.1 source-repository head type: git@@ -39,11 +39,11 @@ base >=4.8 && <5.0 , bifunctors >=4.2 && <5.6 , containers >=0.5.5 && <0.7- , mtl >=2.1 && <2.3+ , mtl >=2.1 && <2.4 , prettyprinter >=1 && <1.8 , profunctors >=4.4 && <5.7- , semigroups >=0.16 && <0.20+ , semigroups >=0.16 && <0.21 , tagged >=0.7 && <0.9- , template-haskell >=2.9 && <2.18+ , template-haskell >=2.9 && <2.20 , transformers >=0.3 && <0.6- , text >=1.2 && <1.3+ , text >=1.2 && <1.3 || >=2.0 && <2.1
src/Control/Monad/ContextError.hs view
@@ -15,14 +15,15 @@ , MonadContextError (..) ) where -#if MIN_VERSION_mtl(2,2,0)-import Control.Monad.Except-#else+#if !MIN_VERSION_mtl(2,2,0) import Control.Monad.Error #endif import Control.Applicative+import Control.Monad (MonadPlus, mplus, mzero)+import Control.Monad.Trans.Class (MonadTrans, lift) import Control.Monad.Trans.Cont as Cont (ContT, liftLocal)+import Control.Monad.Trans.Except (ExceptT, mapExceptT) import Control.Monad.Trans.Identity (IdentityT, mapIdentityT) import Control.Monad.Trans.Maybe (MaybeT, mapMaybeT) import Control.Monad.Trans.Reader (ReaderT, mapReaderT)@@ -113,8 +114,8 @@ pass m = ContextErrorT $ \c err ret -> pass $ do res <- unContextErrorT m c (return . Left) (curry (return . Right)) case res of- Right (c', (a, f)) -> liftM (\b -> (b, f)) $ ret c' a- Left e -> liftM (\b -> (b, id)) $ err e+ Right (c', (a, f)) -> liftA (\b -> (b, f)) $ ret c' a+ Left e -> liftA (\b -> (b, id)) $ err e instance MonadReader r m => MonadReader r (ContextErrorT c e m) where ask = lift ask