mtl-compat 0.2.1.3 → 0.2.2
raw patch · 5 files changed
+63/−21 lines, 5 filesdep ~mtl
Dependency ranges changed: mtl
Files
- CHANGELOG.md +15/−1
- LICENSE +1/−1
- README.md +16/−1
- mtl-compat.cabal +30/−17
- src/Control/Monad/Except.hs +1/−1
CHANGELOG.md view
@@ -1,3 +1,17 @@+### 0.2.2 [2019.04.28]+* `mtl-compat` now uses automatic flags instead of manual ones. This has a+ number of benefits:++ * There is no need for making several simultaneous releases to support each+ flag combination.+ * As a result, the `cabal-install` constraint solver should have a much+ easier time figuring out install-plans involving `mtl-compat`.++ Due to old `cabal-install` bugs, `cabal-install-1.16` and older may have a+ harder time installing this package, so it is recommended that you use+ `cabal-install-1.18` or later. (Or, if you must use `cabal-install-1.16` or+ older, installing `mtl-compat` with the appropriate flags should help.)+ ### 0.2.1.3 * A specific build with no flags explicitly enabled, intended for use with the latest version of `mtl`. This is a workaround for `cabal` backtracker bugs. @@ -9,7 +23,7 @@ ## 0.2.1 * Require use of `transformers-compat-0.4` or greater when building with `mtl-2.1.3.1` or earlier. `transformers-compat-0.4.0.*` adds the missing `ExceptT` instances, which means that `mtl-compat`'s only purpose is to backport the `Control.Monad.Except` module for those who want an `mtl`-style import for `ExceptT` and/or `MonadError`.- + I would recommend just using `Control.Monad.Trans.Except` from `transformers-compat-0.4.0.*` and `Control.Monad.Error.Class` instead, since they accomplish the same thing as `mtl-compat` without an extra dependency. ## 0.1.1
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2015, Ryan Scott+Copyright (c) 2015-2017, Ryan Scott All rights reserved.
README.md view
@@ -1,4 +1,19 @@-# `mtl-compat` [](http://hackage.haskell.org/package/mtl-compat) [](https://travis-ci.org/RyanGlScott/mtl-compat)+# `mtl-compat`+[][Hackage: mtl-compat]+[](http://packdeps.haskellers.com/reverse/mtl-compat)+[][Haskell.org]+[][tl;dr Legal: BSD3]+[](https://travis-ci.org/haskell-compat/mtl-compat)++[Hackage: mtl-compat]:+ http://hackage.haskell.org/package/mtl-compat+ "mtl-compat package on Hackage"+[Haskell.org]:+ http://www.haskell.org+ "The Haskell Programming Language"+[tl;dr Legal: BSD3]:+ https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29+ "BSD 3-Clause License (Revised)" This package backports the `Control.Monad.Except` module from `mtl` (if using `mtl-2.2.0.1` or earlier), which reexports the `ExceptT` monad transformer and the `MonadError` class.
mtl-compat.cabal view
@@ -1,5 +1,5 @@ name: mtl-compat-version: 0.2.1.3+version: 0.2.2 synopsis: Backported Control.Monad.Except module from mtl description: This package backports the "Control.Monad.Except" module from @mtl@ (if using @mtl-2.2.0.1@ or earlier), which reexports the@@ -13,35 +13,46 @@ . Note that unlike how @mtl-2.2@ or later works, the "Control.Monad.Except" module defined in this package exports- all of @ExceptT@'s monad class instances. Therefore, you may + all of @ExceptT@'s monad class instances. Therefore, you may have to declare @import Control.Monad.Except ()@ at the top of your file to get all of the @ExceptT@ instances in scope.-homepage: https://github.com/RyanGlScott/mtl-compat-bug-reports: https://github.com/RyanGlScott/mtl-compat/issues+homepage: https://github.com/haskell-compat/mtl-compat+bug-reports: https://github.com/haskell-compat/mtl-compat/issues stability: Provisional license: BSD3 license-file: LICENSE author: Ryan Scott-maintainer: Ryan Scott <ryan.gl.scott@ku.edu>-copyright: (C) 2015 Ryan Scott+maintainer: Ryan Scott <ryan.gl.scott@gmail.com>+copyright: (C) 2015-2017 Ryan Scott category: Compatibility build-type: Simple extra-source-files: CHANGELOG.md, README.md+tested-with: GHC == 7.0.4+ , GHC == 7.2.2+ , GHC == 7.4.2+ , GHC == 7.6.3+ , GHC == 7.8.4+ , GHC == 7.10.3+ , GHC == 8.0.2+ , GHC == 8.2.2+ , GHC == 8.4.4+ , GHC == 8.6.5+ , GHC == 8.8.1 cabal-version: >=1.8 source-repository head type: git- location: git://github.com/RyanGlScott/mtl-compat.git+ location: https://github.com/haskell-compat/mtl-compat flag two-point-one default: False- manual: True+ manual: False description: Use mtl-2.1.3.1 or earlier with transformers-compat. This will cause this package to export the Control.Monad.Except module. flag two-point-two default: False- manual: True+ manual: False description: Use mtl-2.2.0.1 with transformers. This will cause this package to export the Control.Monad.Except module. @@ -51,15 +62,17 @@ if flag(two-point-one) || flag(two-point-two) exposed-modules: Control.Monad.Except hs-source-dirs: src- ++ if flag(two-point-two)+ build-depends: mtl >= 2.2.0.1 && < 2.2.1+ , transformers >= 0.4.1 && < 0.6+ else+ build-depends: mtl < 2.2.0.1 || >= 2.2.1+ if flag(two-point-one)- build-depends: mtl >= 2.0.1 && < 2.2- , transformers-compat >= 0.4 && < 0.5+ build-depends: mtl >= 2.0.1 && < 2.2+ , transformers-compat >= 0.4 && < 0.7 else- if flag(two-point-two)- build-depends: mtl >= 2.2.0.1 && < 2.2.1- , transformers >= 0.4.1 && < 0.5- else- build-depends: mtl >= 2.2.1 && < 2.3+ build-depends: mtl >= 2.2 ghc-options: -Wall
src/Control/Monad/Except.hs view
@@ -57,7 +57,7 @@ import Control.Monad.Error.Class import Control.Monad.Trans import Control.Monad.Trans.Except- ( ExceptT(ExceptT), Except+ ( ExceptT(..), Except , runExcept, runExceptT , mapExcept, mapExceptT , withExcept, withExceptT