generic-lens-core-2.2.1.0: Generically derive traversals, lenses and prisms.
Copyright(C) 2020 Csongor Kiss
LicenseBSD3
MaintainerCsongor Kiss <kiss.csongor.kiss@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Generics.Product.Internal.Subtype

Description

Structural subtype relationships between product types.

Documentation

type Context a b = (Generic a, Generic b, GSmash (Rep a) (Rep b), GUpcast (Rep a) (Rep b), CustomError a b) #

class GSmash (sub :: k -> Type) (sup :: k -> Type) where #

Methods

gsmash :: forall (p :: k). sup p -> sub p -> sub p #

Instances

Instances details
(GSmash a sup, GSmash b sup) => GSmash (a :*: b :: k -> Type) (sup :: k -> Type) # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

gsmash :: forall (p :: k). sup p -> (a :*: b) p -> (a :*: b) p #

GSmash sub sup => GSmash (C1 c sub :: k -> Type) (sup :: k -> Type) # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

gsmash :: forall (p :: k). sup p -> C1 c sub p -> C1 c sub p #

GSmash sub sup => GSmash (D1 c sub :: k -> Type) (sup :: k -> Type) # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

gsmash :: forall (p :: k). sup p -> D1 c sub p -> D1 c sub p #

(leaf ~ S1 ('MetaSel ('Just field) p f b) t, GSmashLeaf leaf sup (HasTotalFieldP field sup)) => GSmash (S1 ('MetaSel ('Just field) p f b) t :: k -> Type) (sup :: k -> Type) # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

gsmash :: forall (p0 :: k). sup p0 -> S1 ('MetaSel ('Just field) p f b) t p0 -> S1 ('MetaSel ('Just field) p f b) t p0 #

class GUpcast (sub :: Type -> Type) (sup :: Type -> Type) where #

Methods

gupcast :: sub p -> sup p #

Instances

Instances details
(GUpcast sub a, GUpcast sub b) => GUpcast sub (a :*: b) # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

gupcast :: sub p -> (a :*: b) p #

GUpcast sub sup => GUpcast sub (C1 c sup) # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

gupcast :: sub p -> C1 c sup p #

GUpcast sub sup => GUpcast sub (D1 c sup) # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

gupcast :: sub p -> D1 c sup p #

GLens' (HasTotalFieldPSym field) sub t => GUpcast sub (S1 ('MetaSel ('Just field) p f b) (Rec0 t)) # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

gupcast :: sub p0 -> S1 ('MetaSel ('Just field) p f b) (Rec0 t) p0 #