@@ -117,8 +117,12 @@ backslashes within the value must be escaped with a backslash, i.e., ' and \.
118To specify the schema you wish to connect with, use type application.
118To specify the schema you wish to connect with, use type application.
120−>>> :set -XTypeApplication
120+>>> :set -XDataKinds
121+>>> :set -XTypeOperators
122+>>> type Schema = '["tab" ::: '["col" ::: 'Required ('Null 'PGint2)]]
123+>>> :set -XTypeApplications
124+>>> :set -XOverloadedStrings
121−>>> conn <- connectdb @MySchema "host=localhost port=5432 dbname=exampledb"
125+>>> conn <- connectdb @Schema "host=localhost port=5432 dbname=exampledb"
123Note that, for now, squeal doesn't offer any protection from connecting
127Note that, for now, squeal doesn't offer any protection from connecting
124with the wrong schema!
128with the wrong schema!
@@ -193,7 +197,7 @@ pqThen pq2 pq1 = pq1 & pqBind (\ _ -> pq2)
194-- | Run a `Definition` with `LibPQ.exec`, we expect that libpq obeys the law
198-- | Run a `Definition` with `LibPQ.exec`, we expect that libpq obeys the law
196−-- prop> pqThen (define statement2) statement1 = define (statement2 . statement1)
200+-- @pqThen (define statement2) statement1 = define (statement2 . statement1)@
198 :: MonadBase IO io
202 :: MonadBase IO io
199 => Definition schema0 schema1
203 => Definition schema0 schema1
@@ -462,8 +466,8 @@ newtype RowNumber = RowNumber { unRowNumber :: LibPQ.Row }
462newtype ColumnNumber (n :: Nat) (cs :: [k]) (c :: k) =
466newtype ColumnNumber (n :: Nat) (cs :: [k]) (c :: k) =
463 UnsafeColumnNumber { getColumnNumber :: LibPQ.Column }
467 UnsafeColumnNumber { getColumnNumber :: LibPQ.Column }
465−-- | >>> getColumnNumber (columnNumber @5)
469+-- | >>> getColumnNumber (columnNumber @5 @'[_,_,_,_,_,_])
467class KnownNat n => HasColumnNumber n columns column
471class KnownNat n => HasColumnNumber n columns column
468 | n columns -> column where
472 | n columns -> column where
469 columnNumber :: ColumnNumber n columns column
473 columnNumber :: ColumnNumber n columns column