generic-data-functions-0.6.0: Familiar functions lifted to generic data types
Safe HaskellSafe-Inferred
LanguageGHC2021

Generic.Type.CstrPath

Synopsis

Documentation

type family GCstrPath name gf where ... Source #

Get the path to a named constructor in a generic type representation.

The D1 meta must already be stripped.

Equations

GCstrPath name V1 = Left (Text "type is empty (no constructors)") 
GCstrPath name gf = GCstrPath' name '['('[], gf)] 

data GCstrChoice Source #

Which direction to take at a :+: constructor choice.

Constructors

GoL1

left (the L1 constructor)

GoR1

right (the R1 constructor)

Instances

Instances details
(Functor (GenericFOnCstrF tag), GenericFOnCstr tag, GenericFOnCstrC tag dtName cstrName gf) => GFOnCstr' (tag :: k1) dtName cstrName ('[] :: [GCstrChoice]) (C1 mc gf :: k2 -> Type) Source # 
Instance details

Defined in Generic.Data.FOnCstr

Methods

gFOnCstr' :: forall (p :: k10). GenericFOnCstrF tag (C1 mc gf p) Source #

(Functor (GenericFOnCstrF tag), GFOnCstr' tag dtName cstrName turns l) => GFOnCstr' (tag :: k1) dtName cstrName ('GoL1 ': turns) (l :+: r :: k2 -> Type) Source # 
Instance details

Defined in Generic.Data.FOnCstr

Methods

gFOnCstr' :: forall (p :: k10). GenericFOnCstrF tag ((l :+: r) p) Source #

(Functor (GenericFOnCstrF tag), GFOnCstr' tag dtName cstrName turns r) => GFOnCstr' (tag :: k1) dtName cstrName ('GoR1 ': turns) (l :+: r :: k2 -> Type) Source # 
Instance details

Defined in Generic.Data.FOnCstr

Methods

gFOnCstr' :: forall (p :: k10). GenericFOnCstrF tag ((l :+: r) p) Source #