rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Generic.Construction.Record

Documentation

type family GConstructor (rep :: Type -> Type) :: Symbol where ... Source #

Equations

GConstructor (M1 D _1 (M1 C ('MetaCons name _2 _3) _4)) = name 
GConstructor (M1 D ('MetaData name _1 _2 _3) _4) = TypeError (('Text "`" ':<>: 'Text name) ':<>: 'Text "` does not appear to have exactly 1 constructor") :: Symbol 

type family GConstruct (f :: Type -> Exp Type) (rep :: Type -> Type) r where ... Source #

Equations

GConstruct f (M1 _1 _2 rep) r = GConstruct f rep r 
GConstruct f (a :*: b) r = GConstruct f a (GConstruct f b r) 
GConstruct _1 (U1 :: Type -> Type) r = r 
GConstruct f (K1 _1 a :: Type -> Type) r = Eval (f a) -> r 

class GConstructable (_Table :: Type -> Exp Constraint) (_Columns :: Type -> Exp HTable) (f :: Type -> Exp Type) (context :: Context) (rep :: Type -> Type) Source #

Minimal complete definition

gconstruct, gdeconstruct

Instances

Instances details
(GConstructable _Table _Columns f context a, GConstructable _Table _Columns f context b) => GConstructable _Table _Columns f context (a :*: b) Source # 
Instance details

Defined in Rel8.Internal.Generic.Construction.Record

Methods

gconstruct :: ToColumns _Table _Columns f context -> GFields f (a :*: b) -> GColumns _Columns (a :*: b) context Source #

gdeconstruct :: FromColumns _Table _Columns f context -> GColumns _Columns (a :*: b) context -> GFields f (a :*: b) Source #

GConstructable _Table _Columns f context rep => GConstructable _Table _Columns f context (M1 C meta rep) Source # 
Instance details

Defined in Rel8.Internal.Generic.Construction.Record

Methods

gconstruct :: ToColumns _Table _Columns f context -> GFields f (M1 C meta rep) -> GColumns _Columns (M1 C meta rep) context Source #

gdeconstruct :: FromColumns _Table _Columns f context -> GColumns _Columns (M1 C meta rep) context -> GFields f (M1 C meta rep) Source #

GConstructable _Table _Columns f context rep => GConstructable _Table _Columns f context (M1 D meta rep) Source # 
Instance details

Defined in Rel8.Internal.Generic.Construction.Record

Methods

gconstruct :: ToColumns _Table _Columns f context -> GFields f (M1 D meta rep) -> GColumns _Columns (M1 D meta rep) context Source #

gdeconstruct :: FromColumns _Table _Columns f context -> GColumns _Columns (M1 D meta rep) context -> GFields f (M1 D meta rep) Source #

(Eval (_Table a), meta ~ 'MetaSel ('Just label) _su _ss _ds) => GConstructable _Table _Columns f context (M1 S meta (K1 i a :: Type -> Type)) Source # 
Instance details

Defined in Rel8.Internal.Generic.Construction.Record

Methods

gconstruct :: ToColumns _Table _Columns f context -> GFields f (M1 S meta (K1 i a :: Type -> Type)) -> GColumns _Columns (M1 S meta (K1 i a :: Type -> Type)) context Source #

gdeconstruct :: FromColumns _Table _Columns f context -> GColumns _Columns (M1 S meta (K1 i a :: Type -> Type)) context -> GFields f (M1 S meta (K1 i a :: Type -> Type)) Source #

gconstruct :: GConstructable _Table _Columns f context rep => ToColumns _Table _Columns f context -> GFields f rep -> GColumns _Columns rep context Source #

gdeconstruct :: GConstructable _Table _Columns f context rep => FromColumns _Table _Columns f context -> GColumns _Columns rep context -> GFields f rep Source #

type family GFields (f :: Type -> Exp Type) (rep :: Type -> Type) where ... Source #

Equations

GFields f (M1 _1 _2 rep) = GFields f rep 
GFields f (a :*: b) = (GFields f a, GFields f b) 
GFields _1 (U1 :: Type -> Type) = () 
GFields f (K1 _1 a :: Type -> Type) = Eval (f a) 

class Representable (f :: Type -> Exp Type) (rep :: Type -> Type) Source #

Minimal complete definition

gtabulate, gindex

Instances

Instances details
Representable f (U1 :: Type -> Type) Source # 
Instance details

Defined in Rel8.Internal.Generic.Construction.Record

Methods

gtabulate :: (GFields f (U1 :: Type -> Type) -> a) -> GConstruct f (U1 :: Type -> Type) a Source #

gindex :: GConstruct f (U1 :: Type -> Type) a -> GFields f (U1 :: Type -> Type) -> a Source #

(Representable f a, Representable f b) => Representable f (a :*: b) Source # 
Instance details

Defined in Rel8.Internal.Generic.Construction.Record

Methods

gtabulate :: (GFields f (a :*: b) -> a0) -> GConstruct f (a :*: b) a0 Source #

gindex :: GConstruct f (a :*: b) a0 -> GFields f (a :*: b) -> a0 Source #

Representable f (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Rel8.Internal.Generic.Construction.Record

Methods

gtabulate :: (GFields f (K1 i a :: Type -> Type) -> a0) -> GConstruct f (K1 i a :: Type -> Type) a0 Source #

gindex :: GConstruct f (K1 i a :: Type -> Type) a0 -> GFields f (K1 i a :: Type -> Type) -> a0 Source #

Representable f rep => Representable f (M1 i meta rep) Source # 
Instance details

Defined in Rel8.Internal.Generic.Construction.Record

Methods

gtabulate :: (GFields f (M1 i meta rep) -> a) -> GConstruct f (M1 i meta rep) a Source #

gindex :: GConstruct f (M1 i meta rep) a -> GFields f (M1 i meta rep) -> a Source #

gtabulate :: Representable f rep => (GFields f rep -> a) -> GConstruct f rep a Source #

gindex :: Representable f rep => GConstruct f rep a -> GFields f rep -> a Source #

type FromColumns (_Table :: Type -> Exp Constraint) (_Columns :: Type -> Exp HTable) (f :: Type -> Exp Type) (context :: Context) = forall (proxy :: Type -> Type) x. Eval (_Table x) => proxy x -> Eval (_Columns x) context -> Eval (f x) Source #

type ToColumns (_Table :: Type -> Exp Constraint) (_Columns :: Type -> Exp HTable) (f :: Type -> Exp Type) (context :: Context) = forall (proxy :: Type -> Type) x. Eval (_Table x) => proxy x -> Eval (f x) -> Eval (_Columns x) context Source #