data-lens-light 0.1.2.3 → 0.1.2.4
raw patch · 3 files changed
+14/−15 lines, 3 filesdep ~template-haskellPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: template-haskell
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−1
- data-lens-light.cabal +2/−5
- src/Data/Lens/Light/Template.hs +7/−9
CHANGELOG.md view
@@ -1,11 +1,15 @@ Changes ======= +Version 0.1.2.4+---------------++Fix build with template-haskell-2.21 (GHC 9.8)+ Version 0.1.2.3 --------------- Fix build with ghc 9- Version 0.1.2.2 ---------------
data-lens-light.cabal view
@@ -1,8 +1,6 @@--- Initial data-lens-light.cabal generated by cabal init. For further--- documentation, see http://haskell.org/cabal/users-guide/-+cabal-version: >=1.10 name: data-lens-light-version: 0.1.2.3+version: 0.1.2.4 synopsis: Simple lenses, minimum dependencies description: See <https://github.com/feuerbach/data-lens-light/blob/master/README.md> homepage: https://github.com/feuerbach/data-lens-light@@ -16,7 +14,6 @@ extra-source-files: README.md CHANGELOG.md-cabal-version: >=1.10 source-repository head type: git
src/Data/Lens/Light/Template.hs view
@@ -27,7 +27,7 @@ -- -- For example, given the data type: ----- > data Score = Score { +-- > data Score = Score { -- > _p1Score :: Int -- > , _p2Score :: Int -- > , rounds :: Int@@ -49,7 +49,7 @@ makeLenses :: [Name] -> Q [Dec] makeLenses = return . concat <=< mapM makeLens --- | +-- | -- > makeLens a = makeLenses [a] -- -- > $( makeLens ''TypeName )@@ -58,10 +58,8 @@ makeLens n = nameMakeLens n stripUnderscore stripUnderscore :: String -> Maybe String-stripUnderscore [] = Nothing-stripUnderscore s - | head s == '_' = Just (tail s)- | otherwise = Nothing+stripUnderscore ('_':t) = Just t+stripUnderscore _ = Nothing namedFields :: Con -> [VarStrictType] namedFields (RecC _ fs) = fs@@ -81,7 +79,9 @@ _ -> fail $ errmsg t decMakeLens t reified namer -#if MIN_VERSION_template_haskell(2,17,0)+#if MIN_VERSION_template_haskell(2,21,0)+type TyVarBndr' = TyVarBndr BndrVis+#elif MIN_VERSION_template_haskell(2,17,0) type TyVarBndr' = TyVarBndr () #else type TyVarBndr' = TyVarBndr@@ -158,5 +158,3 @@ ++ "\n it is not a type declared with 'data' or 'newtype'" ++ "\n Did you remember to double-tick the type as in" ++ "\n $(makeLenses ''TheType)?"--