@@ -88,7 +88,7 @@ We'll use generics to easily convert between Haskell and PostgreSQL values.
8888```
8989
9090The first step is to define the schema of our database. This is where
91−we use @DataKinds@ and @TypeOperators@.
91+we use `DataKinds` and `TypeOperators`.
9292
9393```Haskell
9494>>> :{
@@ -113,12 +113,12 @@ type Schema =
113113Notice the use of type operators.
114114
115115`:::` is used to pair an alias `GHC.TypeLits.Symbol` with a `SchemumType`,
116−a `TableConstraint` or a `ColumnType`. It is intended to connote Haskell's @::@
116+a `TableConstraint` or a `ColumnType`. It is intended to connote Haskell's `::`
117117operator.
118118
119119`:=>` is used to pair `TableConstraints` with a `ColumnsType`,
120120yielding a `TableType`, or to pair a `ColumnConstraint` with a `NullityType`,
121−yielding a `ColumnType`. It is intended to connote Haskell's @=>@ operator
121+yielding a `ColumnType`. It is intended to connote Haskell's `=>` operator
122122
123123Next, we'll write `Definition`s to set up and tear down the schema. In
124124Squeal, a `Definition` like `createTable`, `alterTable` or `dropTable`
@@ -154,9 +154,9 @@ CREATE TABLE "users" ("id" serial, "name" text NOT NULL, CONSTRAINT "pk_users" P
154154CREATE TABLE "emails" ("id" serial, "user_id" int NOT NULL, "email" text NULL, CONSTRAINT "pk_emails" PRIMARY KEY ("id"), CONSTRAINT "fk_user_id" FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE);
155155```
156156
157−Notice that @setup@ starts with an empty schema @'[]@ and produces @Schema@.
157+Notice that `setup` starts with an empty schema `'[]` and produces `Schema`.
158158In our `createTable` commands we included `TableConstraint`s to define
159−primary and foreign keys, making them somewhat complex. Our @teardown@
159+primary and foreign keys, making them somewhat complex. Our `teardown`
160160`Definition` is simpler.
161161
162162```Haskell
@@ -175,8 +175,8 @@ Next, we'll write `Manipulation`s to insert data into our two tables.
175175A `Manipulation` like `insertRow`, `update` or `deleteFrom`
176176has three type parameters, the schema it refers to, a list of parameters
177177it can take as input, and a list of columns it produces as output. When
178−we insert into the users table, we will need a parameter for the @name@
179−field but not for the @id@ field. Since it's serial, we can use a default
178+we insert into the users table, we will need a parameter for the `name`
179+field but not for the `id` field. Since it's serial, we can use a default
180180value. However, since the emails table refers to the users table, we will
181181need to retrieve the user id that the insert generates and insert it into
182182the emails table. Take a careful look at the type and definition of both
@@ -232,8 +232,8 @@ SELECT "u"."name" AS "userName", "e"."email" AS "userEmail" FROM "users" AS "u"
232232Now that we've defined the SQL side of things, we'll need a Haskell type
233233for users. We give the type `Generics.SOP.Generic` and
234234`Generics.SOP.HasDatatypeInfo` instances so that we can decode the rows
235−we receive when we run @getUsers@. Notice that the record fields of the
236−@User@ type match the column names of @getUsers@.
235+we receive when we run `getUsers`. Notice that the record fields of the
236+`User` type match the column names of `getUsers`.
237237
238238```Haskell
239239>>> data User = User { userName :: Text, userEmail :: Maybe Text } deriving (Show, GHC.Generic)