generic-lens-core 2.1.0.0 → 2.3.0.0
raw patch · 7 files changed
Files
- ChangeLog.md +9/−0
- generic-lens-core.cabal +20/−7
- src/Data/Generics/Internal/Profunctor/Iso.hs +1/−1
- src/Data/Generics/Internal/Profunctor/Prism.hs +2/−2
- src/Data/Generics/Internal/Void.hs +18/−13
- src/Data/Generics/Product/Internal/HList.hs +1/−2
- src/Data/Generics/Product/Internal/Types.hs +1/−0
ChangeLog.md view
@@ -1,3 +1,12 @@+## generic-lens-core-2.3.0.0 (2025-08-27)+- GHC 9.14 compatibility++## generic-lens-core-2.2.1.0 (2022-01-22)+- GHC 9.2 compatibility++## generic-lens-core-2.2.0.0 (2021-07-13)+- GHC 9.0 compatibility+ ## generic-lens-core-2.1.0.0 (2021-01-25) - Expose Data.Generics.Product.Internal.Subtype (#127, Tom Harding)
generic-lens-core.cabal view
@@ -1,5 +1,6 @@+cabal-version: 2.0 name: generic-lens-core-version: 2.1.0.0+version: 2.3.0.0 synopsis: Generically derive traversals, lenses and prisms. description: This library uses GHC.Generics to derive efficient optics (traversals, lenses and prisms) for algebraic data types in a type-directed way, with a focus on good type inference and error messages when possible. .@@ -16,11 +17,23 @@ maintainer: kiss.csongor.kiss@gmail.com category: Generics, Records, Lens build-type: Simple-cabal-version: >= 1.10-Tested-With: GHC == 8.4.1, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1, GHC == 8.10.1 -extra-source-files: ChangeLog.md+tested-with:+ GHC == 9.14.1+ GHC == 9.12.2+ GHC == 9.10.2+ GHC == 9.8.4+ GHC == 9.6.7+ 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 +extra-doc-files: ChangeLog.md+ library exposed-modules: Data.Generics.Internal.GenericN @@ -57,14 +70,14 @@ , Data.Generics.Product.Internal.HList build-depends: base >= 4.11 && < 5- , text >= 1.2 && < 1.3- , indexed-profunctors >= 0.1 && < 1.0+ , text >= 1.2 && < 1.3 || >= 2.0 && < 2.2+ , indexed-profunctors >= 0.1 && < 1 hs-source-dirs: src default-language: Haskell2010+ default-extensions: TypeOperators ghc-options: -Wall source-repository head type: git location: https://github.com/kcsongor/generic-lens-
src/Data/Generics/Internal/Profunctor/Iso.hs view
@@ -73,7 +73,7 @@ {-# INLINE fromIso #-} iso :: (s -> a) -> (b -> t) -> Iso s t a b-iso = dimap+iso sa bt = dimap sa bt {-# INLINE iso #-} withIso :: Iso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
src/Data/Generics/Internal/Profunctor/Prism.hs view
@@ -60,8 +60,8 @@ -- Prism stuff without' :: Prism s t a b -> Prism s t c d -> Prism s t (Either a c) (Either b d)-without' k =- withPrism k $ \bt _ k' ->+without' k k' =+ withPrism k $ \bt _ -> withPrism k' $ \dt setc -> prism (either bt dt) $ \s -> fmap Right (setc s) {-# INLINE without' #-}
src/Data/Generics/Internal/Void.hs view
@@ -1,19 +1,24 @@ {-# LANGUAGE PolyKinds #-}-module Data.Generics.Internal.Void where--{-- Note [Uncluttering type signatures]- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+module Data.Generics.Internal.Void+ ( -- $note+ Void+ , Void1+ , Void2+ ) where - Because the various instances in the library always match (the Has* classes- are essentially glorified constraint synonyms), they get replaced with- their constraints, resulting in large, unreadable types.+--+-- $note+-- = Uncluttering type signatures+--+-- Because the various instances in the library always match (the Has* classes+-- are essentially glorified constraint synonyms), they get replaced with+-- their constraints, resulting in large, unreadable types.+--+-- Writing an (overlapping instance) for this Void type means that the original+-- instance might not be the one selected, thus GHC leaves the constraints in+-- place until further information is provided, at which point the type+-- machinery has sufficient information to reduce to sensible types. - Writing an (overlapping instance) for this Void type means that the original- instance might not be the one selected, thus GHC leaves the constraints in- place until further information is provided, at which point the type- machinery has sufficient information to reduce to sensible types.--} data Void data Void1 a data Void2 a b
src/Data/Generics/Product/Internal/HList.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-}@@ -57,14 +58,12 @@ instance Monoid (HList '[]) where mempty = Nil- mappend _ _ = Nil instance (Semigroup a, Semigroup (HList as)) => Semigroup (HList (a ': as)) where (x :> xs) <> (y :> ys) = (x <> y) :> (xs <> ys) instance (Monoid a, Monoid (HList as)) => Monoid (HList (a ': as)) where mempty = mempty :> mempty- mappend (x :> xs) (y :> ys) = mappend x y :> mappend xs ys class Elem (as :: [(k, Type)]) (key :: k) (i :: Nat) a | as key -> i a instance {-# OVERLAPPING #-} pos ~ 0 => Elem (a ': xs) key pos a
src/Data/Generics/Product/Internal/Types.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-}