rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Generic.Construction

Documentation

type GGBuildable (algebra :: Algebra) (name :: Symbol) (rep :: Context -> Exp (Type -> Type)) = (KnownAlgebra algebra, Eval (GGColumns algebra TColumns (Eval (rep Expr))) ~ Eval (GGColumns algebra TColumns (Eval (rep Expr))), Eval (GGColumns algebra TColumns (Eval (rep Name))) ~ Eval (GGColumns algebra TColumns (Eval (rep Expr))), HTable (Eval (GGColumns algebra TColumns (Eval (rep Expr)))), GGBuildable' algebra name rep) Source #

type family GGBuild (algebra :: Algebra) (name :: Symbol) (rep :: Context -> Exp (Type -> Type)) r where ... Source #

Equations

GGBuild 'Product _name rep r = GConstruct (Id :: Type -> Type -> Type) (Eval (rep Expr)) r 
GGBuild 'Sum name rep r = GConstruct (Id :: Type -> Type -> Type) (GConstructorADT name (Eval (rep Expr))) r 

ggbuild :: forall (algebra :: Algebra) (name :: Symbol) (rep :: Context -> Exp (Type -> Type)) a. GGBuildable algebra name rep => (Eval (GGColumns algebra TColumns (Eval (rep Expr))) Expr -> a) -> GGBuild algebra name rep a Source #

type GGConstructable (algebra :: Algebra) (rep :: Context -> Exp (Type -> Type)) = (KnownAlgebra algebra, Eval (GGColumns algebra TColumns (Eval (rep Expr))) ~ Eval (GGColumns algebra TColumns (Eval (rep Expr))), Eval (GGColumns algebra TColumns (Eval (rep Name))) ~ Eval (GGColumns algebra TColumns (Eval (rep Expr))), HTable (Eval (GGColumns algebra TColumns (Eval (rep Expr)))), GGConstructable' algebra rep) Source #

type family GGConstruct (algebra :: Algebra) (rep :: Context -> Exp (Type -> Type)) r where ... Source #

Equations

GGConstruct 'Product rep r = GConstruct (Id :: Type -> Type -> Type) (Eval (rep Expr)) r -> r 
GGConstruct 'Sum rep r = GConstructADT (Id :: Type -> Type -> Type) (Eval (rep Expr)) r r 

ggconstruct :: forall (algebra :: Algebra) (rep :: Context -> Exp (Type -> Type)) a. GGConstructable algebra rep => (Eval (GGColumns algebra TColumns (Eval (rep Expr))) Expr -> a) -> GGConstruct algebra rep a -> a Source #

type family GGDeconstruct (algebra :: Algebra) (rep :: Context -> Exp (Type -> Type)) a r where ... Source #

Equations

GGDeconstruct 'Product rep a r = GConstruct (Id :: Type -> Type -> Type) (Eval (rep Expr)) r -> a -> r 
GGDeconstruct 'Sum rep a r = GConstructADT (Id :: Type -> Type -> Type) (Eval (rep Expr)) r (a -> r) 

ggdeconstruct :: forall (algebra :: Algebra) (rep :: Context -> Exp (Type -> Type)) a r. (GGConstructable algebra rep, Table Expr r) => (a -> Eval (GGColumns algebra TColumns (Eval (rep Expr))) Expr) -> GGDeconstruct algebra rep a r Source #

ggdeconstructA :: forall (algebra :: Algebra) (rep :: Context -> Exp (Type -> Type)) a (f :: Type -> Type) r. (GGConstructable algebra rep, Apply f, Table Expr r) => (a -> Eval (GGColumns algebra TColumns (Eval (rep Expr))) Expr) -> GGDeconstruct algebra rep a (f r) Source #

type family GGName (algebra :: Algebra) (rep :: Context -> Exp (Type -> Type)) a where ... Source #

Equations

GGName 'Product rep a = GConstruct (Id :: Type -> Type -> Type) (Eval (rep Name)) a 
GGName 'Sum rep a = Name Tag -> GBuildADT (Id :: Type -> Type -> Type) (Eval (rep Name)) a 

ggname :: forall (algebra :: Algebra) (rep :: Context -> Exp (Type -> Type)) a. GGConstructable algebra rep => (Eval (GGColumns algebra TColumns (Eval (rep Expr))) Name -> a) -> GGName algebra rep a Source #