generic-lens-core-2.2.1.0: Generically derive traversals, lenses and prisms.

Copyright | (C) 2020 Csongor Kiss
License | BSD3
Maintainer | Csongor Kiss <kiss.csongor.kiss@gmail.com>
Stability | experimental
Portability | non-portable
Safe Haskell | None
Language | Haskell2010

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 :: k -> Type) (sup :: k -> Type) where Source #

Methods

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

#### Instances

Instances details

(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 :: k). sup p -> (a :*: b) p -> (a :*: b) 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 :: k). sup p -> C1 c sub p -> C1 c sub p Source #
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 :: k). sup p -> D1 c sub p -> D1 c sub 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 :: k). 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 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 #
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 #
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 #
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 #