@@ -73,6 +73,10 @@ import Squeal.PostgreSQL.Alias
7373import Squeal.PostgreSQL.List
7474import Squeal.PostgreSQL.Schema
7575
76+-- $setup
77+-- >>> import Squeal.PostgreSQL
78+-- >>> import Data.Text (Text)
79+
7680{- | The `PG` type family embeds a subset of Haskell types
7781as Postgres types. As an open type family, `PG` is extensible.
7882
@@ -115,8 +119,8 @@ type instance PG Value = 'PGjson
115119Haskell enum type.
116120
117121>>> data Schwarma = Beef | Lamb | Chicken deriving GHC.Generic
118−>>> instance Generic Schwarma
119−>>> instance HasDatatypeInfo Schwarma
122+>>> instance SOP.Generic Schwarma
123+>>> instance SOP.HasDatatypeInfo Schwarma
120124>>> :kind! LabelsPG Schwarma
121125LabelsPG Schwarma :: [Type.ConstructorName]
122126= '["Beef", "Lamb", "Chicken"]
@@ -132,8 +136,8 @@ type family LabelsPG (hask :: Type) :: [Type.ConstructorName] where
132136have the `Generic` and `HasDatatypeInfo` instances;
133137
134138>>> data Person = Person { name :: Text, age :: Int32 } deriving GHC.Generic
135−>>> instance Generic Person
136−>>> instance HasDatatypeInfo Person
139+>>> instance SOP.Generic Person
140+>>> instance SOP.HasDatatypeInfo Person
137141>>> :kind! RowPG Person
138142RowPG Person :: [(Symbol, NullityType)]
139143= '["name" ::: 'NotNull 'PGtext, "age" ::: 'NotNull 'PGint4]
@@ -180,8 +184,8 @@ type family ColumnsOf (record :: [(Symbol, Type)]) :: ColumnsType where
180184have the `Generic` and `HasDatatypeInfo` instances;
181185
182186>>> data Person = Person { name :: Text, age :: Int32 } deriving GHC.Generic
183−>>> instance Generic Person
184−>>> instance HasDatatypeInfo Person
187+>>> instance SOP.Generic Person
188+>>> instance SOP.HasDatatypeInfo Person
185189>>> :kind! Entity Person
186190Entity Person :: [(Symbol, (ColumnConstraint, NullityType))]
187191= '["name" ::: ('NoDef :=> 'NotNull 'PGtext),