lens-family-th 0.5.2.1 → 0.5.3.0
raw patch · 3 files changed
+23/−8 lines, 3 filesdep ~template-haskellPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: template-haskell
API changes (from Hackage documentation)
- Lens.Family.THCore: type LensTypeInfo = (Name, [TyVarBndr])
+ Lens.Family.THCore: type LensTypeInfo = (Name, [TyVarBndr ()])
Files
- README.md +1/−1
- lens-family-th.cabal +16/−4
- src/Lens/Family/THCore.hs +6/−3
README.md view
@@ -1,7 +1,7 @@ lens-family-th ============== -+ Template Haskell to generate lenses for lens-family and lens-family-core.
lens-family-th.cabal view
@@ -1,5 +1,5 @@ name: lens-family-th-version: 0.5.2.1+version: 0.5.3.0 synopsis: Generate lens-family style lenses description: (see README.md)@@ -19,6 +19,18 @@ extra-source-files: README.md +tested-with: GHC == 9.8.1+ , GHC == 9.6.3+ , GHC == 9.4.8+ , GHC == 9.2.8+ , GHC == 9.0.2+ , GHC == 8.10.7+ , GHC == 8.8.4+ , GHC == 8.6.5+ , GHC == 8.4.4+ , GHC == 8.2.2+ , GHC == 8.0.2+ library default-language: Haskell2010 hs-source-dirs: src@@ -26,7 +38,7 @@ , Lens.Family2.TH , Lens.Family.THCore build-depends: base >= 4.9 && < 5- , template-haskell >= 2.11 && < 2.19+ , template-haskell >= 2.11 && < 2.22 test-suite lens-family-th-test default-language: Haskell2010@@ -40,5 +52,5 @@ , template-haskell source-repository head- type: git- location: git://github.com/DanBurton/lens-family-th.git+ type: git+ location: git://github.com/DanBurton/lens-family-th.git
src/Lens/Family/THCore.hs view
@@ -24,7 +24,9 @@ -- | Information about the larger type the lens will operate on. type LensTypeInfo =-#if MIN_VERSION_template_haskell(2,17,0)+#if MIN_VERSION_template_haskell(2,21,0)+ (Name, [TyVarBndr BndrVis])+#elif MIN_VERSION_template_haskell(2,17,0) (Name, [TyVarBndr ()]) #else (Name, [TyVarBndr])@@ -159,9 +161,10 @@ deconstructReconstruct :: Con -> String -> (Pat, Exp) deconstructReconstruct c nameBase = (pat, expr) where #if MIN_VERSION_template_haskell(2,18,0)- pat = ConP conN [] (map VarP argNames)+ -- ConP Name [Type] [Pat]+ pat = ConP conN mempty (map VarP argNames) #else- pat = ConP conN (map VarP argNames)+ pat = ConP conN (map VarP argNames) #endif expr = foldl AppE (ConE conN) (map VarE argNames) (conN, nArgs) = getConInfo c