generic-lens-core-2.1.0.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) Source #

class GSmash sub sup where Source #

Methods

gsmash :: sup p -> sub p -> sub p Source #

Instances

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

Defined in Data.Generics.Product.Internal.Subtype

Methods

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

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

Defined in Data.Generics.Product.Internal.Subtype

Methods

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

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

Defined in Data.Generics.Product.Internal.Subtype

Methods

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

(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) Source # 
Instance details

Defined in Data.Generics.Product.Internal.Subtype

Methods

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

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

Methods

gupcast :: sub p -> sup p Source #

Instances

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

Defined in Data.Generics.Product.Internal.Subtype

Methods

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

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

Defined in Data.Generics.Product.Internal.Subtype

Methods

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

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

Defined in Data.Generics.Product.Internal.Subtype

Methods

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

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

Defined in Data.Generics.Product.Internal.Subtype

Methods

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