recursion-schemes 5.2.2.3 → 5.2.2.4
raw patch · 3 files changed
+20/−12 lines, 3 filesdep ~base-orphansdep ~template-haskelldep ~th-abstraction
Dependency ranges changed: base-orphans, template-haskell, th-abstraction
Files
- CHANGELOG.markdown +6/−3
- recursion-schemes.cabal +2/−2
- src/Data/Functor/Foldable/TH.hs +12/−7
CHANGELOG.markdown view
@@ -1,3 +1,6 @@+## 5.2.2.4 [2023-02-27]+* Support `th-abstraction-0.3.0.0` or later.+ ## 5.2.2.3 * Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/18320, which was@@ -17,7 +20,7 @@ * `makeBaseFunctor` no longer generates warnings when combined with DerivingStrategies. -## 5.2.1 [2020.10.04]+## 5.2.1 [2020-10-04] * Allow building with `template-haskell-2.17.0.0` (GHC 9.0). ## 5.2@@ -29,7 +32,7 @@ and `Corecursive` instances. * Depend on `data-fix` package for fixed point types. -## 5.1.3 [2019.04.26]+## 5.1.3 [2019-04-26] * Support `th-abstraction-0.3.0.0` or later. ## 5.1.2@@ -54,7 +57,7 @@ * Add `hoist`, `hoistMu` and `hoistNu` * Add `transverse` and `cataA` -## 5.0.3 [2018.07.01]+## 5.0.3 [2018-07-01] * Make the Template Haskell machinery look through type synonyms. * Avoid incurring some dependencies when using recent GHCs.
recursion-schemes.cabal view
@@ -1,6 +1,6 @@ name: recursion-schemes category: Control, Recursion-version: 5.2.2.3+version: 5.2.2.4 license: BSD2 cabal-version: 1.18 license-file: LICENSE@@ -85,7 +85,7 @@ build-depends: template-haskell >= 2.5.0.0 && < 2.20, base-orphans >= 0.5.4 && < 0.9,- th-abstraction >= 0.4 && < 0.5+ th-abstraction >= 0.4 && < 0.6 exposed-modules: Data.Functor.Foldable.TH
src/Data/Functor/Foldable/TH.hs view
@@ -229,17 +229,22 @@ , datatypeInstTypes = instTys , datatypeCons = cons , datatypeVariant = variant }) = do- when isDataFamInstance $- fail "makeBaseFunctor: Data families are currently not supported."+ checkAllowed makePrimForDI' rules mkInstance' (variant == Newtype) tyName (map toTyVarBndr instTys) cons where- isDataFamInstance = case variant of- DataInstance -> True- NewtypeInstance -> True- Datatype -> False- Newtype -> False+ checkAllowed =+ case variant of+ Datatype -> pure ()+ Newtype -> pure ()+ DataInstance -> dataFamilyError+ NewtypeInstance -> dataFamilyError+#if MIN_VERSION_th_abstraction(0,5,0)+ TH.Abs.TypeData -> fail "makeBaseFunctor: `type data` declarations are not supported."+#endif++ dataFamilyError = fail "makeBaseFunctor: Data families are currently not supported." toTyVarBndr :: Type -> TyVarBndrUnit toTyVarBndr (VarT n) = plainTV n