@@ -45,6 +45,7 @@ module Squeal.PostgreSQL.Schema
45 , RelationsType
45 , RelationsType
46 , TableType
46 , TableType
47 , TablesType
47 , TablesType
48 , Grouping (..)
49 , Grouping (..)
49 -- * Constraints
50 -- * Constraints
@@ -135,7 +136,7 @@ data PGType
135-- | The object identifier of a `PGType`.
136-- | The object identifier of a `PGType`.
137-- >>> :set -XTypeApplications
138-- >>> :set -XTypeApplications
138−-- >>> oid @'PGbool
139+-- >>> oid @'PGbool
140class HasOid (ty :: PGType) where oid :: Word32
141class HasOid (ty :: PGType) where oid :: Word32
141instance HasOid 'PGbool where oid = 16
142instance HasOid 'PGbool where oid = 16
@@ -268,6 +269,8 @@ type TableType = ([(Symbol,TableConstraint)],ColumnsType)
270type TablesType = [(Symbol,TableType)]
271type TablesType = [(Symbol,TableType)]
272+-- | A monokinded `'[]` of `TablesType`.
273+type family NilTables :: TablesType where NilTables = '[]
272-- | `RelationType` is a row of `NullityType`
275-- | `RelationType` is a row of `NullityType`
@@ -282,6 +285,7 @@ type TablesType = [(Symbol,TableType)]
282-- >>> :kind Relation
285-- >>> :kind Relation
283-- Relation :: [(Symbol, NullityType)]
286-- Relation :: [(Symbol, NullityType)]
284type RelationType = [(Symbol,NullityType)]
287type RelationType = [(Symbol,NullityType)]
288+-- | A monokinded `'[]` of `RelationType`.
285type family NilRelation :: RelationType where NilRelation = '[]
289type family NilRelation :: RelationType where NilRelation = '[]
287-- | `RelationsType` is a row of `RelationType`s, thought of as a product.
291-- | `RelationsType` is a row of `RelationType`s, thought of as a product.