| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rel8.Internal.Generic.Construction.ADT
Documentation
class GConstructableADT (_Table :: Type -> Exp Constraint) (_Columns :: Type -> Exp HTable) (f :: Type -> Exp Type) (context :: Context) (rep :: Type -> Type) Source #
Minimal complete definition
Instances
| (htable ~ HLabel "tag" (HIdentity Tag), GConstructableADT' _Table _Columns f context htable rep) => GConstructableADT _Table _Columns f context (M1 D meta rep) Source # | |
Defined in Rel8.Internal.Generic.Construction.ADT Methods gbuildADT :: ToColumns _Table _Columns f context -> (Tag -> Nullifier context) -> HIdentity Tag context -> GFieldsADT f (M1 D meta rep) -> GColumnsADT _Columns (M1 D meta rep) context Source # gunbuildADT :: FromColumns _Table _Columns f context -> Unnullifier context -> GColumnsADT _Columns (M1 D meta rep) context -> (HIdentity Tag context, GFieldsADT f (M1 D meta rep)) Source # gconstructADT :: ToColumns _Table _Columns f context -> Null context -> Nullifier context -> (Tag -> HIdentity Tag context) -> GConstructors f (M1 D meta rep) (GColumnsADT _Columns (M1 D meta rep) context) Source # gdeconstructADT :: FromColumns _Table _Columns f context -> Unnullifier context -> GConstructors f (M1 D meta rep) r -> GColumnsADT _Columns (M1 D meta rep) context -> (HIdentity Tag context, NonEmpty (Tag, r)) Source # | |
gbuildADT :: GConstructableADT _Table _Columns f context rep => ToColumns _Table _Columns f context -> (Tag -> Nullifier context) -> HIdentity Tag context -> GFieldsADT f rep -> GColumnsADT _Columns rep context Source #
gunbuildADT :: GConstructableADT _Table _Columns f context rep => FromColumns _Table _Columns f context -> Unnullifier context -> GColumnsADT _Columns rep context -> (HIdentity Tag context, GFieldsADT f rep) Source #
type family GConstructADT (f :: Type -> Exp Type) (rep :: Type -> Type) r x where ... Source #
Equations
| GConstructADT f (M1 D _1 rep) r x = GConstructADT f rep r x | |
| GConstructADT f (a :+: b) r x = GConstructADT f a r (GConstructADT f b r x) | |
| GConstructADT f (M1 C _1 rep) r x = GConstruct f rep r -> x |
gconstructADT :: GConstructableADT _Table _Columns f context rep => ToColumns _Table _Columns f context -> Null context -> Nullifier context -> (Tag -> HIdentity Tag context) -> GConstructors f rep (GColumnsADT _Columns rep context) Source #
gdeconstructADT :: GConstructableADT _Table _Columns f context rep => FromColumns _Table _Columns f context -> Unnullifier context -> GConstructors f rep r -> GColumnsADT _Columns rep context -> (HIdentity Tag context, NonEmpty (Tag, r)) Source #
class RepresentableFields (f :: Type -> Exp Type) (rep :: Type -> Type) Source #
Minimal complete definition
Instances
| (RepresentableFields f a, RepresentableFields f b) => RepresentableFields f (a :+: b) Source # | |
| Representable f rep => RepresentableFields f (M1 C meta rep) Source # | |
| RepresentableFields f rep => RepresentableFields f (M1 D meta rep) Source # | |
gftabulate :: RepresentableFields f rep => (GFieldsADT f rep -> a) -> GBuildADT f rep a Source #
gfindex :: RepresentableFields f rep => GBuildADT f rep a -> GFieldsADT f rep -> a Source #
type family GConstructors (f :: Type -> Exp Type) (rep :: Type -> Type) :: Type -> Type where ... Source #
Equations
| GConstructors f (M1 D _1 rep) = GConstructors f rep | |
| GConstructors f (a :+: b) = GConstructors f a :*: GConstructors f b | |
| GConstructors f (M1 C _1 rep) = (->) (GFields f rep) |
class RepresentableConstructors (f :: Type -> Exp Type) (rep :: Type -> Type) Source #
Minimal complete definition
Instances
gctabulate :: RepresentableConstructors f rep => (GConstructors f rep r -> a) -> GConstructADT f rep r a Source #
gcindex :: RepresentableConstructors f rep => GConstructADT f rep r a -> GConstructors f rep r -> a Source #
type family GConstructorADT (name :: Symbol) (rep :: Type -> Type) :: Type -> Type where ... Source #
class GMakeableADT (_Table :: Type -> Exp Constraint) (_Columns :: Type -> Exp HTable) (f :: Type -> Exp Type) (context :: Context) (name :: Symbol) (rep :: Type -> Type) Source #
Minimal complete definition
Instances
| (htable ~ HLabel "tag" (HIdentity Tag), meta ~ 'MetaData datatype _module _package _newtype, fallback ~ (TypeError (NoConstructor datatype name) :: Type -> Type), fields ~ GFields f (GConstructorADT' name rep fallback), GMakeableADT' _Table _Columns f context htable name rep fields, KnownSymbol name) => GMakeableADT _Table _Columns f context name (M1 D meta rep) Source # | |
Defined in Rel8.Internal.Generic.Construction.ADT | |
gmakeADT :: GMakeableADT _Table _Columns f context name rep => ToColumns _Table _Columns f context -> Null context -> Nullifier context -> (Tag -> HIdentity Tag context) -> GFields f (GConstructorADT name rep) -> GColumnsADT _Columns rep context Source #