Skip to content

Commit

Permalink
Bring Tutorials in line with latest API
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Ellis committed Apr 21, 2018
1 parent a32c2f3 commit 5b5fc34
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Doc/Tutorial/TutorialBasic.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Opaleye assumes that a Postgres database already exists. Currently
there is no support for creating databases or tables, though these
features may be added later according to demand.

A table is defined with the `Table` constructor. The syntax is
A table is defined with the `table` function. The syntax is
simple. You specify the types of the columns, the name of the table
and the names of the columns in the underlying database, and whether
the columns are required or optional.
Expand Down
6 changes: 3 additions & 3 deletions Doc/Tutorial/TutorialBasicMonomorphic.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Opaleye assumes that a Postgres database already exists. Currently
there is no support for creating databases or tables, though these
features may be added later according to demand.

A table is defined with the `Table` constructor. The syntax is
A table is defined with the `table` function. The syntax is
simple. You specify the types of the columns, the name of the table
and the names of the columns in the underlying database, and whether
the columns are required or optional.
Expand Down Expand Up @@ -270,8 +270,8 @@ Note: In `widgetTable` and `aggregateWidgets` we see more explicit
uses of our Template Haskell derived code. We use the 'pWidget'
"adaptor" to specify how columns are aggregated. Note that this is
yet another example of avoiding a headache by keeping your datatype
fully polymorphic, because the 'count' aggregator changes a 'Wire
String' into a 'Wire Int64'.
fully polymorphic, because the 'count' aggregator changes a 'Column
String' into a 'Column Int64'.
Outer join
==========
Expand Down
10 changes: 6 additions & 4 deletions Doc/Tutorial/TutorialBasicTypeFamilies.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
> showSqlForPostgres, Unpackspec,
> PGInt4, PGInt8, PGText, PGDate, PGFloat8)
>
> import Control.Applicative ((<$>), (<*>), Applicative)
>
> import qualified Data.Profunctor as P
> import qualified Data.Profunctor.Product as PP
> import Data.Profunctor.Product (p3)
Expand All @@ -43,7 +45,7 @@ Opaleye assumes that a Postgres database already exists. Currently
there is no support for creating databases or tables, though these
features may be added later according to demand.

A table is defined with the `Table` constructor. The syntax is
A table is defined with the `table` function. The syntax is
simple. You specify the types of the columns, the name of the table
and the names of the columns in the underlying database, and whether
the columns are required or optional.
Expand All @@ -68,7 +70,7 @@ manipulation tutorial you can see an example of when they might differ.

By default, the table `"personTable"` is looked up in PostgreSQL's
default `"public"` schema. If we wanted to specify a different schema we
could have used the `tableWithSchema` constructor instead of `table`.
could have used the `tableWithSchema` function instead of `table`.
To query a table we use `queryTable`.
Expand Down Expand Up @@ -286,8 +288,8 @@ Note: In `widgetTable` and `aggregateWidgets` we see more explicit
uses of our Template Haskell derived code. We use the 'pWidget'
"adaptor" to specify how columns are aggregated. Note that this is
yet another example of avoiding a headache by keeping your datatype
fully polymorphic, because the 'count' aggregator changes a 'Wire
String' into a 'Wire Int64'.
fully polymorphic, because the 'count' aggregator changes a 'Column
String' into a 'Column Int64'.
Outer join
==========
Expand Down

0 comments on commit 5b5fc34

Please sign in to comment.