mirror of
https://github.com/circuithub/rel8.git
synced 2024-08-17 20:00:23 +03:00
Add and export KRel8able
This commit is contained in:
parent
04fdf2732d
commit
242dc79996
@ -26,7 +26,7 @@ module Rel8
|
||||
, DBFractional
|
||||
|
||||
-- * Tables and higher-kinded tables
|
||||
, Rel8able
|
||||
, Rel8able, KRel8able
|
||||
, Column, Field, Necessity( Required, Optional )
|
||||
, Default
|
||||
, HMaybe
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
module Rel8.Schema.Generic
|
||||
( Rel8able
|
||||
, KRel8able
|
||||
)
|
||||
where
|
||||
|
||||
@ -61,6 +62,10 @@ instance
|
||||
toColumns = hunreify . gtoColumns . reify
|
||||
|
||||
|
||||
type KRel8able :: Type
|
||||
type KRel8able = K.Table
|
||||
|
||||
|
||||
-- | This type class allows you to define custom 'Table's using higher-kinded
|
||||
-- data types. Higher-kinded data types are data types of the pattern:
|
||||
--
|
||||
@ -103,7 +108,7 @@ instance
|
||||
-- data MyType f = MyType { fieldA :: Column f T }
|
||||
-- deriving ( GHC.Generics.Generic, Rel8able )
|
||||
-- @
|
||||
type Rel8able :: K.Table -> Constraint
|
||||
type Rel8able :: KRel8able -> Constraint
|
||||
class HTable (GRep t) => Rel8able t where
|
||||
gfromColumns :: (Labelable context, Reifiable context)
|
||||
=> GRep t (Col (Reify context)) -> t (Reify context)
|
||||
|
Loading…
Reference in New Issue
Block a user