packages feed

enum-subset-generate 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+16/−10 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,9 @@ # Changelog for enum-subset-generate -## Unreleased changes+## 0.1.0.1++* Compatibility with `template-haskell-2.18.0.0`.++## 0.1.0.0++* Initial release.
enum-subset-generate.cabal view
@@ -1,11 +1,13 @@--- This file has been generated from package.yaml by hpack version 0.20.0.+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack ----- hash: 210be2dcefc78aeda1dc543c2fa846235ed2b84ed1f12a983fd64581e6582774+-- hash: efe37aacd446eae1dadcf60ba8107734c3fe9b5203f9cea1255d8e232ac299db  name:           enum-subset-generate-version:        0.1.0.0+version:        0.1.0.1 synopsis:       Generate an ADT being a subset of another ADT, and the corresponding mappings. description:    Please see the README on GitHub at <https://github.com/0xd34df00d/enum-subset-generate#readme> category:       Data@@ -17,11 +19,9 @@ license:        BSD3 license-file:   LICENSE build-type:     Simple-cabal-version:  >= 1.10- extra-source-files:-    ChangeLog.md     README.md+    ChangeLog.md  source-repository head   type: git
src/Data/MakeEnum.hs view
@@ -29,7 +29,7 @@   _ -> fail "unsupported type"   where omit' = Just <$> omit -data DataDef = DataDef Cxt Name [TyVarBndr] (Maybe Kind) [Con] [DerivClause]+data DataDef = DataDef Cxt Name [TyVarBndr ()] (Maybe Kind) [Con] [DerivClause]              deriving (Eq, Ord, Show)  unwrapDec :: Dec -> Maybe DataDef@@ -72,7 +72,7 @@       let thisName = mkName $ thisModName <> "." <> ctorNameModifier (nameBase n)       binders <- replicateM (length ts) $ newName "p"       let body = NormalB $ ConE (mkName "Just") `AppE` (ConE thisName `foldBinders` binders)-      pure $ Clause [ConP n $ VarP <$> binders] body []+      pure $ Clause [ConP n [] $ VarP <$> binders] body []     mkClause _ p = fail $ "this type of constructor is not supported yet:\n" <> pprint p  buildToFun :: DeducedOptions -> Name -> [Con] -> Q (Dec, Dec)@@ -92,7 +92,7 @@       let thisName = mkName $ thisModName <> "." <> ctorNameModifier (nameBase n)       binders <- replicateM (length ts) $ newName "p"       let body = NormalB $ ConE n `foldBinders` binders-      pure $ Clause [ConP thisName $ VarP <$> binders] body []+      pure $ Clause [ConP thisName [] $ VarP <$> binders] body []     mkClause _ p = fail $ "this type of constructor is not supported yet:\n" <> pprint p  foldBinders :: Exp -> [Name] -> Exp