@@ -12,7 +12,7 @@ Stability: experimental
13This module provides binary encoding and decoding between Haskell and PostgreSQL types.
13This module provides binary encoding and decoding between Haskell and PostgreSQL types.
15−Instances are governed by the `Generic` and `HasDatatypeInfo` typeclasses, so you absolutely
15+Instances are governed by the `SOP.Generic` and `SOP.HasDatatypeInfo` typeclasses, so you absolutely
16do not need to define your own instances to decode retrieved rows into Haskell values or
16do not need to define your own instances to decode retrieved rows into Haskell values or
17to encode Haskell values into statement parameters.
17to encode Haskell values into statement parameters.
@@ -24,7 +24,7 @@ Let's see some examples. We'll need some imports
24>>> import Control.Monad.Base (liftBase)
24>>> import Control.Monad.Base (liftBase)
25>>> import Squeal.PostgreSQL
25>>> import Squeal.PostgreSQL
27−Define a Haskell datatype `Row` that will serve as both the input and output of a simple
27+Define a Haskell datatype @Row@ that will serve as both the input and output of a simple
28round trip query.
28round trip query.
30>>> data Row = Row { col1 :: Int16, col2 :: Text, col3 :: Maybe Bool } deriving (Eq, GHC.Generic)
30>>> data Row = Row { col1 :: Int16, col2 :: Text, col3 :: Maybe Bool } deriving (Eq, GHC.Generic)
@@ -125,9 +125,9 @@ let
125 createTypeCompositeFrom @Person #person
125 createTypeCompositeFrom @Person #person
128−Let's demonstrate how to associate our Haskell types `Schwarma` and `Person`
128+Let's demonstrate how to associate our Haskell types @Schwarma@ and @Person@
129with enumerated, composite or json types in Postgres. First create a Haskell
129with enumerated, composite or json types in Postgres. First create a Haskell
130−`Row` type using the `Enumerated`, `Composite` and `Json` newtypes as fields.
130+@Row@ type using the `Enumerated`, `Composite` and `Json` newtypes as fields.
133data Row = Row
133data Row = Row
@@ -210,6 +210,7 @@ module Squeal.PostgreSQL.Binary
210 , Composite (..)
210 , Composite (..)
211 , Enumerated (..)
211 , Enumerated (..)
212 , VarArray (..)
212 , VarArray (..)
213 -- * Encoding
214 -- * Encoding
214 , ToParam (..)
215 , ToParam (..)
215 , ToParams (..)
216 , ToParams (..)
@@ -424,7 +425,7 @@ instance
425-- | A `ToParams` constraint generically sequences the encodings of `Type`s
426-- | A `ToParams` constraint generically sequences the encodings of `Type`s
426-- of the fields of a tuple or record to a row of `ColumnType`s. You should
427-- of the fields of a tuple or record to a row of `ColumnType`s. You should
427−-- not define instances of `ToParams`. Instead define `Generic` instances
428+-- not define instances of `ToParams`. Instead define `SOP.Generic` instances
428-- which in turn provide `ToParams` instances.
429-- which in turn provide `ToParams` instances.
429class SListI tys => ToParams (x :: Type) (tys :: [NullityType]) where
430class SListI tys => ToParams (x :: Type) (tys :: [NullityType]) where
430 -- | >>> type Params = '[ 'NotNull 'PGbool, 'Null 'PGint2]
431 -- | >>> type Params = '[ 'NotNull 'PGbool, 'Null 'PGint2]
@@ -611,7 +612,7 @@ instance
611-- | A `FromRow` constraint generically sequences the parsings of the columns
612-- | A `FromRow` constraint generically sequences the parsings of the columns
612-- of a `RowType` into the fields of a record `Type` provided they have
613-- of a `RowType` into the fields of a record `Type` provided they have
613-- the same field names. You should not define instances of `FromRow`.
614-- the same field names. You should not define instances of `FromRow`.
614−-- Instead define `Generic` and `HasDatatypeInfo` instances which in turn
615+-- Instead define `SOP.Generic` and `SOP.HasDatatypeInfo` instances which in turn
615-- provide `FromRow` instances.
616-- provide `FromRow` instances.
616class SListI result => FromRow (result :: RowType) y where
617class SListI result => FromRow (result :: RowType) y where
617 -- | >>> :set -XOverloadedStrings
618 -- | >>> :set -XOverloadedStrings