refined 0.7 → 0.8
raw patch · 3 files changed
+21/−11 lines, 3 filesdep ~aesondep ~basedep ~template-haskell
Dependency ranges changed: aeson, base, template-haskell
Files
- changelog.md +10/−2
- refined.cabal +6/−5
- src/Refined.hs +5/−4
changelog.md view
@@ -4,8 +4,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to the [Haskell Package Versioning Policy](https://pvp.haskell.org/). -## Unreleased-### [0.7] - 2022-07-01+## [0.8] - 2022-10-09+### Changed+- on GHC >=9, make `refineTH` and `refineTH_` work in any monad+ `(Quote m, MonadFail m)`.+- bump `base`: "< 4.17" -> "< 4.18"+- bump `template-haskell`: "< 2.19" -> "< 2.20"+- bump `aeson`: "< 2.1" -> "< 2.2"++## [0.7] - 2022-07-01+### Changed - make `Refined` predicate type `p` kind polymorphic (`p :: Type` -> `p :: k`) ## [0.6.3] - 2022-01-14
refined.cabal view
@@ -3,7 +3,7 @@ name: refined version:- 0.7+ 0.8 synopsis: Refinement types with static and runtime checking description:@@ -35,7 +35,8 @@ , GHC == 8.8.5 , GHC == 8.10.7 , GHC == 9.0.2- , GHC == 9.2.1+ , GHC == 9.2.4+ , GHC == 9.4.2 extra-source-files: README.md , changelog.md@@ -72,17 +73,17 @@ default-language: Haskell2010 build-depends:- base >= 4.11 && < 4.17+ base >= 4.11 && < 4.18 , bytestring >= 0.10 && < 0.12 , deepseq >= 1.4 && < 1.5 , exceptions >= 0.8 && < 0.11 , hashable >= 1.0 && < 1.5 , mtl >= 2.2.2 && < 2.3- , template-haskell >= 2.9 && < 2.19+ , template-haskell >= 2.9 && < 2.20 , text >= 1.2 && < 2.1 , these-skinny >= 0.7.5 && < 0.8 if flag(aeson)- build-depends: aeson >= 0.9 && < 2.1+ build-depends: aeson >= 0.9 && < 2.2 cpp-options: -DHAVE_AESON if flag(QuickCheck) build-depends: QuickCheck >= 2.1 && < 2.15
src/Refined.hs view
@@ -52,6 +52,7 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-}+{-# LANGUAGE UndecidableInstances #-} -------------------------------------------------------------------------------- @@ -439,9 +440,9 @@ -- -- @since 0.1.0.0 #if MIN_VERSION_template_haskell(2,17,0)-refineTH :: forall p x. (Predicate p x, TH.Lift x)+refineTH :: forall p x m. (Predicate p x, TH.Lift x, TH.Quote m, MonadFail m) => x- -> TH.Code TH.Q (Refined p x)+ -> TH.Code m (Refined p x) refineTH = let showException = refineExceptionToTree .> showTree True@@ -468,9 +469,9 @@ -- -- @since 0.4.4 #if MIN_VERSION_template_haskell(2,17,0)-refineTH_ :: forall p x. (Predicate p x, TH.Lift x)+refineTH_ :: forall p x m. (Predicate p x, TH.Lift x, TH.Quote m, MonadFail m) => x- -> TH.Code TH.Q x+ -> TH.Code m x refineTH_ = refineTH @p @x .> TH.examineCode