@@ -18,6 +18,7 @@
19module Rel8.Schema.Generic
19module Rel8.Schema.Generic
20 ( Rel8able
20 ( Rel8able
@@ -61,6 +62,10 @@ instance
61 toColumns = hunreify . gtoColumns . reify
62 toColumns = hunreify . gtoColumns . reify
65+type KRel8able :: Type
66+type KRel8able = K.Table
64-- | This type class allows you to define custom 'Table's using higher-kinded
69-- | This type class allows you to define custom 'Table's using higher-kinded
65-- data types. Higher-kinded data types are data types of the pattern:
70-- data types. Higher-kinded data types are data types of the pattern:
@@ -103,7 +108,7 @@ instance
103-- data MyType f = MyType { fieldA :: Column f T }
108-- data MyType f = MyType { fieldA :: Column f T }
104-- deriving ( GHC.Generics.Generic, Rel8able )
109-- deriving ( GHC.Generics.Generic, Rel8able )
106−type Rel8able :: K.Table -> Constraint
111+type Rel8able :: KRel8able -> Constraint
107class HTable (GRep t) => Rel8able t where
112class HTable (GRep t) => Rel8able t where
108 gfromColumns :: (Labelable context, Reifiable context)
113 gfromColumns :: (Labelable context, Reifiable context)
109 => GRep t (Col (Reify context)) -> t (Reify context)
114 => GRep t (Col (Reify context)) -> t (Reify context)