on dev help sign in
schema doc fixes
commitec5511f21d9c8e5f946495151dd127c1e2bc91db authorEitan Chatav <eitan.chatav@gmail.com> dateWed 23 Aug 2017, 19:45 (9 years ago) parente9d2691
1 file changed+8−7
squeal-postgresql/src/Squeal/PostgreSQL/Schema.hs+8−7
squeal-postgresql/src/Squeal/PostgreSQL/Schema.hs+8−7
@@ -128,7 +128,8 @@ type ColumnsType = [(Symbol,ColumnType)]
128128
129129-- | `TablesType` is a kind synonym for a row of `ColumnsType`s.
130130-- It is used as a kind for both a schema, a disjoint union of tables,
131−-- and a joined table `Squeal.Query.FromClause`, a product of tables.
131+-- and a joined table `Squeal.PostgreSQL.Query.FromClause`,
132+-- a product of tables.
132133type TablesType = [(Symbol,ColumnsType)]
133134
134135-- | `Grouping` is an auxiliary namespace, created by
@@ -154,7 +155,7 @@ type PGFloating ty = In ty '[ 'PGfloat4, 'PGfloat8, 'PGnumeric]
154155-- `Squeal.PostgreSQL.Expression.mod_` functions.
155156type PGIntegral ty = In ty '[ 'PGint2, 'PGint4, 'PGint8]
156157
157−-- | `:::` is the promoted version of `As`, a type level pair between
158+-- | `:::` is like a promoted version of `As`, a type level pair between
158159-- an alias and some type, usually a column alias and a `ColumnType` or
159160-- a table alias and a `ColumnsType`.
160161type (:::) (alias :: Symbol) (ty :: polykind) = '(alias,ty)
@@ -175,7 +176,7 @@ instance alias1 ~ alias2 => IsLabel alias1 (Alias alias2) where
175176renderAlias :: KnownSymbol alias => Alias alias -> ByteString
176177renderAlias = fromString . symbolVal
177178
178−-- | The `As` operator is used to name an expression. `As` is the demoted
179+-- | The `As` operator is used to name an expression. `As` is like a demoted
179180-- version of `:::`.
180181--
181182-- >>> Just "hello" `As` #hi :: Aliased Maybe ("hi" ::: String)
@@ -211,13 +212,13 @@ class IsTableColumn table column expression where
211212 infixl 9 !
212213instance IsTableColumn table column (Alias table, Alias column) where (!) = (,)
213214
214−-- | `In x xs` is a constraint that proves that `x` is in `xs.
215+-- | @In x xs@ is a constraint that proves that @x@ is in @xs@.
215216type family In x xs :: Constraint where
216217 In x (x ': xs) = ()
217218 In x (y ': xs) = In x xs
218219
219−-- | `HasUnique alias xs x` is a constraint that proves that xs is a singleton
220−-- of `alias ::: x`.
220+-- | @HasUnique alias xs x@ is a constraint that proves that @xs@ is a singleton
221+-- of @alias ::: x@.
221222type HasUnique alias xs x = xs ~ '[alias ::: x]
222223
223224-- | `BaseType` forgets about @NULL@ and @DEFAULT@
@@ -259,7 +260,7 @@ type family NullifyColumns (columns :: ColumnsType) :: ColumnsType where
259260
260261-- | `NullifyTables` is an idempotent that nullifies a `TablesType`
261262-- used to nullify the left or right hand side of an outer join
262−-- in a `Squeal.PostgreSQL.Query.FromClause`
263+-- in a `Squeal.PostgreSQL.Query.FromClause`.
263264type family NullifyTables (tables :: TablesType) :: TablesType where
264265 NullifyTables '[] = '[]
265266 NullifyTables ((table ::: columns) ': tables) =