generic-lens-core 2.2.1.0 → 2.3.0.0
raw patch · 4 files changed
+41/−22 lines, 4 filesdep ~indexed-profunctorsnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: indexed-profunctors
API changes (from Hackage documentation)
- Data.Generics.Product.Internal.HList: instance forall k (pos :: GHC.Types.Nat) (a :: (k, *)) (xs :: [(k, *)]) (key :: k). (pos GHC.Types.~ 0) => Data.Generics.Product.Internal.HList.Elem (a : xs) key pos a
- Data.Generics.Product.Internal.HList: instance forall k1 k2 (xs :: [(k1, *)]) (key :: k1) (i :: GHC.Types.Nat) (a :: k2) (pos :: GHC.Types.Nat) (x :: (k1, *)). (Data.Generics.Product.Internal.HList.Elem xs key i a, pos GHC.Types.~ (i GHC.TypeNats.+ 1)) => Data.Generics.Product.Internal.HList.Elem (x : xs) key pos a
- Data.Generics.Product.Internal.Positions: instance (Data.Generics.Product.Internal.Positions.ErrorUnless i s ((0 Data.Generics.Product.Internal.Positions.<? i) Data.Type.Bool.&& (i GHC.TypeNats.<=? Data.Generics.Product.Internal.Positions.Size (GHC.Generics.Rep s))), Data.Generics.Internal.Families.Has.HasTotalPositionP i (Data.Generics.Product.Internal.Positions.CRep s) GHC.Types.~ 'GHC.Maybe.Just a, Data.Generics.Internal.Families.Has.HasTotalPositionP i (Data.Generics.Product.Internal.Positions.CRep t) GHC.Types.~ 'GHC.Maybe.Just b, Data.Generics.Internal.Families.Has.HasTotalPositionP i (Data.Generics.Product.Internal.Positions.CRep (Data.Generics.Internal.Families.Changing.Indexed s)) GHC.Types.~ 'GHC.Maybe.Just a', Data.Generics.Internal.Families.Has.HasTotalPositionP i (Data.Generics.Product.Internal.Positions.CRep (Data.Generics.Internal.Families.Changing.Indexed t)) GHC.Types.~ 'GHC.Maybe.Just b', t GHC.Types.~ Data.Generics.Internal.Families.Changing.Infer s a' b, s GHC.Types.~ Data.Generics.Internal.Families.Changing.Infer t b' a) => Data.Generics.Product.Internal.Positions.Context i s t a b
- Data.Generics.Product.Internal.Positions: type x <? y = Not (y <=? x)
- Data.Generics.Product.Internal.Types: instance (Data.Generics.Product.Internal.Types.GHasTypes ch (GHC.Generics.Rep s) (GHC.Generics.Rep t) a b, GHC.Generics.Generic s, GHC.Generics.Generic t, Data.Generics.Internal.Errors.Defined (GHC.Generics.Rep s) (Data.Generics.Internal.Errors.PrettyError '[ 'GHC.TypeLits.Text "No instance " 'GHC.TypeLits.:<>: Data.Generics.Internal.Errors.QuoteType (Data.Generics.Product.Internal.Types.HasTypesCustom ch s t a b)]) (() :: Constraint)) => Data.Generics.Product.Internal.Types.HasTypesCustom ch s t a b
+ Data.Generics.Product.Internal.HList: instance forall k (pos :: GHC.Num.Natural.Natural) (a :: (k, *)) (xs :: [(k, *)]) (key :: k). (pos GHC.Types.~ 0) => Data.Generics.Product.Internal.HList.Elem (a : xs) key pos a
+ Data.Generics.Product.Internal.HList: instance forall k1 k2 (xs :: [(k1, *)]) (key :: k1) (i :: GHC.TypeNats.Nat) (a :: k2) (pos :: GHC.Num.Natural.Natural) (x :: (k1, *)). (Data.Generics.Product.Internal.HList.Elem xs key i a, pos GHC.Types.~ (i GHC.TypeNats.+ 1)) => Data.Generics.Product.Internal.HList.Elem (x : xs) key pos a
+ Data.Generics.Product.Internal.Positions: instance (Data.Generics.Product.Internal.Positions.ErrorUnless i s ((0 Data.Generics.Product.Internal.Positions.<? i) Data.Type.Bool.&& (i Data.Type.Ord.<=? Data.Generics.Product.Internal.Positions.Size (GHC.Generics.Rep s))), Data.Generics.Internal.Families.Has.HasTotalPositionP i (Data.Generics.Product.Internal.Positions.CRep s) GHC.Types.~ 'GHC.Maybe.Just a, Data.Generics.Internal.Families.Has.HasTotalPositionP i (Data.Generics.Product.Internal.Positions.CRep t) GHC.Types.~ 'GHC.Maybe.Just b, Data.Generics.Internal.Families.Has.HasTotalPositionP i (Data.Generics.Product.Internal.Positions.CRep (Data.Generics.Internal.Families.Changing.Indexed s)) GHC.Types.~ 'GHC.Maybe.Just a', Data.Generics.Internal.Families.Has.HasTotalPositionP i (Data.Generics.Product.Internal.Positions.CRep (Data.Generics.Internal.Families.Changing.Indexed t)) GHC.Types.~ 'GHC.Maybe.Just b', t GHC.Types.~ Data.Generics.Internal.Families.Changing.Infer s a' b, s GHC.Types.~ Data.Generics.Internal.Families.Changing.Infer t b' a) => Data.Generics.Product.Internal.Positions.Context i s t a b
+ Data.Generics.Product.Internal.Positions: type (x :: k) <? (y :: k) = Not y <=? x
+ Data.Generics.Product.Internal.Types: instance (Data.Generics.Product.Internal.Types.GHasTypes ch (GHC.Generics.Rep s) (GHC.Generics.Rep t) a b, GHC.Generics.Generic s, GHC.Generics.Generic t, Data.Generics.Internal.Errors.Defined (GHC.Generics.Rep s) (Data.Generics.Internal.Errors.PrettyError '[ 'GHC.TypeError.Text "No instance " 'GHC.TypeError.:<>: Data.Generics.Internal.Errors.QuoteType (Data.Generics.Product.Internal.Types.HasTypesCustom ch s t a b)]) (() :: Constraint)) => Data.Generics.Product.Internal.Types.HasTypesCustom ch s t a b
- Data.GenericLens.Internal: Coyoneda :: (a -> b) -> f a -> Coyoneda f b
+ Data.GenericLens.Internal: Coyoneda :: (a -> b) -> f a -> Coyoneda (f :: Type -> Type) b
- Data.GenericLens.Internal: Rec :: K1 R a x -> Rec (p :: Type) a x
+ Data.GenericLens.Internal: Rec :: K1 R a x -> Rec p a (x :: k)
- Data.GenericLens.Internal: [unRec] :: Rec (p :: Type) a x -> K1 R a x
+ Data.GenericLens.Internal: [unRec] :: Rec p a (x :: k) -> K1 R a x
- Data.GenericLens.Internal: _Left :: Prism (Either a c) (Either b c) a b
+ Data.GenericLens.Internal: _Left :: forall a c b p i. Choice p => p i a b -> p i (Either a c) (Either b c)
- Data.GenericLens.Internal: _Right :: Prism (Either c a) (Either c b) a b
+ Data.GenericLens.Internal: _Right :: forall c a b p i. Choice p => p i a b -> p i (Either c a) (Either c b)
- Data.GenericLens.Internal: assoc3 :: Iso ((a, b), c) ((a', b'), c') (a, (b, c)) (a', (b', c'))
+ Data.GenericLens.Internal: assoc3 :: forall a b c a' b' c' p i. Profunctor p => p i (a, (b, c)) (a', (b', c')) -> p i ((a, b), c) ((a', b'), c')
- Data.GenericLens.Internal: assoc3L :: Lens ((a, b), c) ((a', b'), c') (a, (b, c)) (a', (b', c'))
+ Data.GenericLens.Internal: assoc3L :: forall a b c a' b' c' p i. Strong p => p i (a, (b, c)) (a', (b', c')) -> p i ((a, b), c) ((a', b'), c')
- Data.GenericLens.Internal: choosing :: forall s t a b s' t'. Lens s t a b -> Lens s' t' a b -> Lens (Either s s') (Either t t') a b
+ Data.GenericLens.Internal: choosing :: Lens s t a b -> Lens s' t' a b -> Lens (Either s s') (Either t t') a b
- Data.GenericLens.Internal: class (Coercible (Rep a) (RepN a), Generic a) => GenericN (a :: Type) where {
+ Data.GenericLens.Internal: class (Coercible Rep a RepN a, Generic a) => GenericN a where {
- Data.GenericLens.Internal: data Coyoneda f b
+ Data.GenericLens.Internal: data Coyoneda (f :: Type -> Type) b
- Data.GenericLens.Internal: first :: Lens ((a :*: b) x) ((a' :*: b) x) (a x) (a' x)
+ Data.GenericLens.Internal: first :: forall a (b :: Type -> Type) x a' p i. Strong p => p i (a x) (a' x) -> p i ((a :*: b) x) ((a' :*: b) x)
- Data.GenericLens.Internal: kIso :: Iso (K1 r a p) (K1 r b p) a b
+ Data.GenericLens.Internal: kIso :: forall r a p1 b p2 i. Profunctor p2 => p2 i a b -> p2 i (K1 r a p1) (K1 r b p1)
- Data.GenericLens.Internal: left :: Prism ((a :+: c) x) ((b :+: c) x) (a x) (b x)
+ Data.GenericLens.Internal: left :: forall a (c :: Type -> Type) x b p i. Choice p => p i (a x) (b x) -> p i ((a :+: c) x) ((b :+: c) x)
- Data.GenericLens.Internal: mIso :: Iso (M1 i c f p) (M1 i c g p) (f p) (g p)
+ Data.GenericLens.Internal: mIso :: forall i1 (c :: Meta) f p1 g p2 i2. Profunctor p2 => p2 i2 (f p1) (g p1) -> p2 i2 (M1 i1 c f p1) (M1 i1 c g p1)
- Data.GenericLens.Internal: newtype Rec (p :: Type) a x
+ Data.GenericLens.Internal: newtype Rec p a (x :: k)
- Data.GenericLens.Internal: prodIso :: Iso ((a :*: b) x) ((a' :*: b') x) (a x, b x) (a' x, b' x)
+ Data.GenericLens.Internal: prodIso :: forall a b x a' b' p i. Profunctor p => p i (a x, b x) (a' x, b' x) -> p i ((a :*: b) x) ((a' :*: b') x)
- Data.GenericLens.Internal: recIso :: Iso (Rec r a p) (Rec r b p) a b
+ Data.GenericLens.Internal: recIso :: forall r a p1 b p2 i. Profunctor p2 => p2 i a b -> p2 i (Rec r a p1) (Rec r b p1)
- Data.GenericLens.Internal: right :: Prism ((a :+: b) x) ((a :+: c) x) (b x) (c x)
+ Data.GenericLens.Internal: right :: forall (a :: Type -> Type) b x c p i. Choice p => p i (b x) (c x) -> p i ((a :+: b) x) ((a :+: c) x)
- Data.GenericLens.Internal: second :: Lens ((a :*: b) x) ((a :*: b') x) (b x) (b' x)
+ Data.GenericLens.Internal: second :: forall (a :: Type -> Type) b x b' p i. Strong p => p i (b x) (b' x) -> p i ((a :*: b) x) ((a :*: b') x)
- Data.GenericLens.Internal: sumIso :: Iso ((a :+: b) x) ((a' :+: b') x) (Either (a x) (b x)) (Either (a' x) (b' x))
+ Data.GenericLens.Internal: sumIso :: forall a b x a' b' p i. Profunctor p => p i (Either (a x) (b x)) (Either (a' x) (b' x)) -> p i ((a :+: b) x) ((a' :+: b') x)
- Data.GenericLens.Internal: type LensLike p s t a b = p a b -> p s t
+ Data.GenericLens.Internal: type LensLike (p :: Type -> Type -> Type) s t a b = p a b -> p s t
- Data.GenericLens.Internal: type RepN a = Rep (Indexed a 0);
+ Data.GenericLens.Internal: type RepN a = Rep Indexed a 0;
- Data.GenericLens.Internal: type family RepN (a :: Type) :: Type -> Type;
+ Data.GenericLens.Internal: type family RepN a :: Type -> Type
- Data.GenericLens.Internal: type Prism' s a = forall p i. (Choice p) => p i a a -> p i s s
+ Data.GenericLens.Internal: type Prism' s a = forall (p :: Type -> Type -> Type -> Type) i. Choice p => p i a a -> p i s s
- Data.GenericLens.Internal: withLensPrim :: Lens s t a b -> (forall c. (s -> (c, a)) -> ((c, b) -> t) -> r) -> r
+ Data.GenericLens.Internal: withLensPrim :: Lens s t a b -> (forall c. () => (s -> (c, a)) -> ((c, b) -> t) -> r) -> r
- Data.Generics.Internal.Families.Changing: type Indexed t = Indexed' t 0
+ Data.Generics.Internal.Families.Changing: type Indexed (t :: k) = Indexed' t 0
- Data.Generics.Internal.Void: data Void1 a
+ Data.Generics.Internal.Void: data Void1 (a :: k)
- Data.Generics.Internal.Void: data Void2 a b
+ Data.Generics.Internal.Void: data Void2 (a :: k) (b :: k1)
- Data.Generics.Internal.Wrapped: type Context s t a b = (Generic s, Generic t, GWrapped (Rep s) (Rep t) a b, UnifyHead s t, UnifyHead t s, ErrorUnlessOnlyOne s (Rep s))
+ Data.Generics.Internal.Wrapped: type Context s t a b = (Generic s, Generic t, GWrapped Rep s Rep t a b, UnifyHead s t, UnifyHead t s, ErrorUnlessOnlyOne s Rep s)
- Data.Generics.Product.Internal.Fields: class Context (field :: Symbol) s t a b | s field -> a, t field -> b, s field b -> t, t field a -> s
+ Data.Generics.Product.Internal.Fields: class Context (field :: Symbol) (s :: k) (t :: k1) (a :: k2) (b :: k3) | s field -> a, t field -> b, s field b -> t, t field a -> s
- Data.Generics.Product.Internal.Fields: derived :: forall field s t a b. Context0 field s t a b => Lens s t a b
+ Data.Generics.Product.Internal.Fields: derived :: forall (field :: Symbol) s t a b. Context0 field s t a b => Lens s t a b
- Data.Generics.Product.Internal.Fields: type Context' field s a = (Generic s, ErrorUnless field s (CollectField field (Rep s)), GLens' (HasTotalFieldPSym field) (Rep s) a, Defined (Rep s) (NoGeneric s '[ 'Text "arising from a generic lens focusing on the " :<>: QuoteType field :<>: 'Text " field of type " :<>: QuoteType a, 'Text "in " :<>: QuoteType s]) (() :: Constraint))
+ Data.Generics.Product.Internal.Fields: type Context' (field :: Symbol) s a = (Generic s, ErrorUnless field s CollectField field Rep s, GLens' HasTotalFieldPSym field Rep s a, Defined Rep s NoGeneric s '[ 'Text "arising from a generic lens focusing on the " ':<>: QuoteType field ':<>: 'Text " field of type " ':<>: QuoteType a, 'Text "in " ':<>: QuoteType s] ())
- Data.Generics.Product.Internal.Fields: type Context0 field s t a b = (Generic s, Generic t, GLens (HasTotalFieldPSym field) (Rep s) (Rep t) a b, ErrorUnless field s (CollectField field (Rep s)), Defined (Rep s) (NoGeneric s '[ 'Text "arising from a generic lens focusing on the " :<>: QuoteType field :<>: 'Text " field of type " :<>: QuoteType a, 'Text "in " :<>: QuoteType s]) (() :: Constraint))
+ Data.Generics.Product.Internal.Fields: type Context0 (field :: Symbol) s t a b = (Generic s, Generic t, GLens HasTotalFieldPSym field Rep s Rep t a b, ErrorUnless field s CollectField field Rep s, Defined Rep s NoGeneric s '[ 'Text "arising from a generic lens focusing on the " ':<>: QuoteType field ':<>: 'Text " field of type " ':<>: QuoteType a, 'Text "in " ':<>: QuoteType s] ())
- Data.Generics.Product.Internal.Fields: type Context_ field s t a b = (HasTotalFieldP field (Rep s) ~ 'Just a, HasTotalFieldP field (Rep t) ~ 'Just b, UnifyHead s t, UnifyHead t s)
+ Data.Generics.Product.Internal.Fields: type Context_ (field :: Symbol) s t a b = (HasTotalFieldP field Rep s ~ 'Just a, HasTotalFieldP field Rep t ~ 'Just b, UnifyHead s t, UnifyHead t s)
- Data.Generics.Product.Internal.GLens: type GLens' pred s a = GLens pred s s a a
+ Data.Generics.Product.Internal.GLens: type GLens' (pred :: Pred) (s :: Type -> Type) a = GLens pred s s a a
- Data.Generics.Product.Internal.HList: [:>] :: a -> HList as -> HList (a : as)
+ Data.Generics.Product.Internal.HList: [:>] :: forall a (as1 :: [Type]). a -> HList as1 -> HList (a ': as1)
- Data.Generics.Product.Internal.HList: [Nil] :: HList '[]
+ Data.Generics.Product.Internal.HList: [Nil] :: HList ('[] :: [Type])
- Data.Generics.Product.Internal.HList: class Elem (as :: [(k, Type)]) (key :: k) (i :: Nat) a | as key -> i a
+ Data.Generics.Product.Internal.HList: class Elem (as :: [(k1, Type)]) (key :: k1) (i :: Nat) (a :: k) | as key -> i a
- Data.Generics.Product.Internal.HList: class IndexList (i :: Nat) as bs a b | i as -> a, i bs -> b, i as b -> bs, i bs a -> as
+ Data.Generics.Product.Internal.HList: class IndexList (i :: Nat) (as :: [Type]) (bs :: [Type]) a b | i as -> a, i bs -> b, i as b -> bs, i bs a -> as
- Data.Generics.Product.Internal.HList: class ListTuple (tuple :: Type) (tuple' :: Type) (as :: [Type]) (bs :: [Type]) | as -> tuple, bs -> tuple'
+ Data.Generics.Product.Internal.HList: class ListTuple tuple tuple' (as :: [Type]) (bs :: [Type]) | as -> tuple, bs -> tuple'
- Data.Generics.Product.Internal.HList: type family TupleToList a
+ Data.Generics.Product.Internal.HList: type family TupleToList a :: [Type]
- Data.Generics.Product.Internal.Param: derived :: forall n s t a b. Context n s t a b => Traversal s t a b
+ Data.Generics.Product.Internal.Param: derived :: forall (n :: Nat) s t a b. Context n s t a b => Traversal s t a b
- Data.Generics.Product.Internal.Param: type Context n s t a b = (GenericN s, GenericN t, Defined (Rep s) (NoGeneric s '[ 'Text "arising from a generic traversal of the type parameter at position " :<>: QuoteType n, 'Text "of type " :<>: QuoteType a :<>: 'Text " in " :<>: QuoteType s]) (() :: Constraint), s ~ Infer t (P n b 'PTag) a, t ~ Infer s (P n a 'PTag) b, Error ((ArgCount s) <=? n) n (ArgCount s) s, a ~ ArgAt s n, b ~ ArgAt t n, GHasTypes ChGeneric (RepN s) (RepN t) (Param n a) (Param n b))
+ Data.Generics.Product.Internal.Param: type Context (n :: Nat) s t a b = (GenericN s, GenericN t, Defined Rep s NoGeneric s '[ 'Text "arising from a generic traversal of the type parameter at position " ':<>: QuoteType n, 'Text "of type " ':<>: QuoteType a ':<>: 'Text " in " ':<>: QuoteType s] (), s ~ Infer t P n b 'PTag a, t ~ Infer s P n a 'PTag b, Error ArgCount s <=? n n ArgCount s s, a ~ ArgAt s n :: Type, b ~ ArgAt t n :: Type, GHasTypes ChGeneric RepN s RepN t Param n a Param n b)
- Data.Generics.Product.Internal.Positions: class Context (i :: Nat) s t a b | s i -> a, t i -> b, s i b -> t, t i a -> s
+ Data.Generics.Product.Internal.Positions: class Context (i :: Nat) (s :: k) (t :: k1) (a :: k2) (b :: k3) | s i -> a, t i -> b, s i b -> t, t i a -> s
- Data.Generics.Product.Internal.Positions: derived' :: forall i s a. Context' i s a => Lens s s a a
+ Data.Generics.Product.Internal.Positions: derived' :: forall (i :: Nat) s a. Context' i s a => Lens s s a a
- Data.Generics.Product.Internal.Positions: derived0 :: forall i s t a b. Context0 i s t a b => Lens s t a b
+ Data.Generics.Product.Internal.Positions: derived0 :: forall (i :: Nat) s t a b. Context0 i s t a b => Lens s t a b
- Data.Generics.Product.Internal.Positions: type Context' (i :: Nat) s a = (Generic s, ErrorUnless i s (0 <? i && i <=? Size (Rep s)), Coercible (Rep s) (CRep s), GLens' (HasTotalPositionPSym i) (CRep s) a, Defined (Rep s) (NoGeneric s '[ 'Text "arising from a generic lens focusing on the field at", 'Text "position " :<>: QuoteType i :<>: 'Text " of type " :<>: QuoteType a :<>: 'Text " in " :<>: QuoteType s]) (() :: Constraint))
+ Data.Generics.Product.Internal.Positions: type Context' (i :: Nat) s a = (Generic s, ErrorUnless i s 0 <? i && i <=? Size Rep s, Coercible Rep s CRep s, GLens' HasTotalPositionPSym i CRep s a, Defined Rep s NoGeneric s '[ 'Text "arising from a generic lens focusing on the field at", 'Text "position " ':<>: QuoteType i ':<>: 'Text " of type " ':<>: QuoteType a ':<>: 'Text " in " ':<>: QuoteType s] ())
- Data.Generics.Product.Internal.Positions: type Context0 i s t a b = (Generic s, Generic t, GLens (HasTotalPositionPSym i) (CRep s) (CRep t) a b, Coercible (CRep s) (Rep s), Coercible (CRep t) (Rep t), Defined (Rep s) (NoGeneric s '[ 'Text "arising from a generic lens focusing on the field at", 'Text "position " :<>: QuoteType i :<>: 'Text " of type " :<>: QuoteType a :<>: 'Text " in " :<>: QuoteType s]) (() :: Constraint))
+ Data.Generics.Product.Internal.Positions: type Context0 (i :: Nat) s t a b = (Generic s, Generic t, GLens HasTotalPositionPSym i CRep s CRep t a b, Coercible CRep s Rep s, Coercible CRep t Rep t, Defined Rep s NoGeneric s '[ 'Text "arising from a generic lens focusing on the field at", 'Text "position " ':<>: QuoteType i ':<>: 'Text " of type " ':<>: QuoteType a ':<>: 'Text " in " ':<>: QuoteType s] ())
- Data.Generics.Product.Internal.Positions: type Context_ i s t a b = (ErrorUnless i s (0 <? i && i <=? Size (Rep s)), UnifyHead s t, UnifyHead t s)
+ Data.Generics.Product.Internal.Positions: type Context_ (i :: Nat) s t (a :: k) (b :: k1) = (ErrorUnless i s 0 <? i && i <=? Size Rep s, UnifyHead s t, UnifyHead t s)
- Data.Generics.Product.Internal.Positions: type family CRep (a :: Type) :: G
+ Data.Generics.Product.Internal.Positions: type family CRep a :: G
- Data.Generics.Product.Internal.Subtype: class GSmash sub sup
+ Data.Generics.Product.Internal.Subtype: class GSmash (sub :: k -> Type) (sup :: k -> Type)
- Data.Generics.Product.Internal.Subtype: gsmash :: GSmash sub sup => sup p -> sub p -> sub p
+ Data.Generics.Product.Internal.Subtype: gsmash :: forall (p :: k). GSmash sub sup => sup p -> sub p -> sub p
- Data.Generics.Product.Internal.Subtype: type Context a b = (Generic a, Generic b, GSmash (Rep a) (Rep b), GUpcast (Rep a) (Rep b), CustomError a b)
+ Data.Generics.Product.Internal.Subtype: type Context a b = (Generic a, Generic b, GSmash Rep a Rep b, GUpcast Rep a Rep b, CustomError a b)
- Data.Generics.Product.Internal.Typed: derived :: forall a s. Context a s => Lens s s a a
+ Data.Generics.Product.Internal.Typed: derived :: Context a s => Lens s s a a
- Data.Generics.Product.Internal.Typed: type Context a s = (Generic s, ErrorUnlessOne a s (CollectTotalType a (Rep s)), Defined (Rep s) (NoGeneric s '[ 'Text "arising from a generic lens focusing on a field of type " :<>: QuoteType a]) (() :: Constraint), GLens (HasTotalTypePSym a) (Rep s) (Rep s) a a)
+ Data.Generics.Product.Internal.Typed: type Context a s = (Generic s, ErrorUnlessOne a s CollectTotalType a Rep s, Defined Rep s NoGeneric s '[ 'Text "arising from a generic lens focusing on a field of type " ':<>: QuoteType a] (), GLens HasTotalTypePSym a Rep s Rep s a a)
- Data.Generics.Product.Internal.Types: class GHasTypes ch s t a b
+ Data.Generics.Product.Internal.Types: class GHasTypes (ch :: k) (s :: k1 -> Type) (t :: k1 -> Type) a b
- Data.Generics.Product.Internal.Types: class HasTypesCustom (ch :: Type) s t a b
+ Data.Generics.Product.Internal.Types: class HasTypesCustom ch s t a b
- Data.Generics.Product.Internal.Types: class HasTypesOpt (ch :: Type) (p :: Bool) s t a b
+ Data.Generics.Product.Internal.Types: class HasTypesOpt ch (p :: Bool) s t a b
- Data.Generics.Product.Internal.Types: class HasTypesUsing (ch :: Type) s t a b
+ Data.Generics.Product.Internal.Types: class HasTypesUsing ch s t a b
- Data.Generics.Product.Internal.Types: gtypes_ :: GHasTypes ch s t a b => Traversal (s x) (t x) a b
+ Data.Generics.Product.Internal.Types: gtypes_ :: forall (x :: k1). GHasTypes ch s t a b => Traversal (s x) (t x) a b
- Data.Generics.Product.Internal.Types: type Interesting (ch :: Type) (a :: Type) (t :: Type) = Defined_list (Children ch t) (NoChildren ch t) (IsNothing (Interesting' ch a '[t] (Children ch t)))
+ Data.Generics.Product.Internal.Types: type Interesting ch a t = Defined_list Children ch t NoChildren ch t IsNothing Interesting' ch a '[t] Children ch t
- Data.Generics.Product.Internal.Types: type family IsNothing a
+ Data.Generics.Product.Internal.Types: type family IsNothing (a1 :: Maybe a) :: Bool
- Data.Generics.Sum.Internal.Constructors: class GAsConstructor (ctor :: Symbol) s t a b | ctor s -> a, ctor t -> b
+ Data.Generics.Sum.Internal.Constructors: class GAsConstructor (ctor :: Symbol) (s :: Type -> Type) (t :: Type -> Type) a b | ctor s -> a, ctor t -> b
- Data.Generics.Sum.Internal.Constructors: derived0 :: forall ctor s t a b. Context0 ctor s t a b => Prism s t a b
+ Data.Generics.Sum.Internal.Constructors: derived0 :: forall (ctor :: Symbol) s t a b. Context0 ctor s t a b => Prism s t a b
- Data.Generics.Sum.Internal.Constructors: type Context' ctor s a = (Context0 ctor s s a a, ErrorUnless ctor s (HasCtorP ctor (Rep s)))
+ Data.Generics.Sum.Internal.Constructors: type Context' (ctor :: Symbol) s a = (Context0 ctor s s a a, ErrorUnless ctor s HasCtorP ctor Rep s)
- Data.Generics.Sum.Internal.Constructors: type Context0 ctor s t a b = (Generic s, Generic t, GAsConstructor ctor (Rep s) (Rep t) a b, Defined (Rep s) (NoGeneric s '[ 'Text "arising from a generic prism focusing on the " :<>: QuoteType ctor :<>: 'Text " constructor of type " :<>: QuoteType a, 'Text "in " :<>: QuoteType s]) (() :: Constraint))
+ Data.Generics.Sum.Internal.Constructors: type Context0 (ctor :: Symbol) s t a b = (Generic s, Generic t, GAsConstructor ctor Rep s Rep t a b, Defined Rep s NoGeneric s '[ 'Text "arising from a generic prism focusing on the " ':<>: QuoteType ctor ':<>: 'Text " constructor of type " ':<>: QuoteType a, 'Text "in " ':<>: QuoteType s] ())
- Data.Generics.Sum.Internal.Constructors: type GAsConstructor' ctor s a = GAsConstructor ctor s s a a
+ Data.Generics.Sum.Internal.Constructors: type GAsConstructor' (ctor :: Symbol) (s :: Type -> Type) a = GAsConstructor ctor s s a a
- Data.Generics.Sum.Internal.Subtype: type Context sub sup = (Generic sub, Generic sup, GAsSubtype (Rep sub) (Rep sup))
+ Data.Generics.Sum.Internal.Subtype: type Context sub sup = (Generic sub, Generic sup, GAsSubtype Rep sub Rep sup)
- Data.Generics.Sum.Internal.Typed: class GAsType (f :: Type -> Type) (as :: Type)
+ Data.Generics.Sum.Internal.Typed: class GAsType (f :: Type -> Type) as
- Data.Generics.Sum.Internal.Typed: type Context a s = (Generic s, ErrorUnlessOne a s (CollectPartialType (TupleToList a) (Rep s)), GAsType (Rep s) a, Defined (Rep s) (NoGeneric s '[ 'Text "arising from a generic prism focusing on a constructor of type " :<>: QuoteType a]) (() :: Constraint))
+ Data.Generics.Sum.Internal.Typed: type Context a s = (Generic s, ErrorUnlessOne a s CollectPartialType TupleToList a Rep s, GAsType Rep s a, Defined Rep s NoGeneric s '[ 'Text "arising from a generic prism focusing on a constructor of type " ':<>: QuoteType a] ())
Files
- ChangeLog.md +3/−0
- generic-lens-core.cabal +20/−7
- src/Data/Generics/Internal/Void.hs +18/−13
- src/Data/Generics/Product/Internal/HList.hs +0/−2
ChangeLog.md view
@@ -1,3 +1,6 @@+## 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.cabal view
@@ -1,5 +1,6 @@+cabal-version: 2.0 name: generic-lens-core-version: 2.2.1.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.4, GHC == 8.10.3, GHC == 9.0.1, GHC == 9.2.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/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
@@ -58,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