Skip to content

Commit 3957b53

Browse files
authored
clarify 'type's constructors' (#205)
Based on discussion [here](#203), this change clarifies the usage of the terms `type's constructors`
1 parent b378308 commit 3957b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/chapter5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ The `Point` data type illustrates some interesting points:
384384

385385
This declaration defines `Shape` as a sum of different constructors, and for each constructor identifies the data that is included. A `Shape` is either a `Circle` which contains a center `Point` and a radius (a number), or a `Rectangle`, or a `Line`, or `Text`. There are no other ways to construct a value of type `Shape`.
386386

387-
An algebraic data type is introduced using the `data` keyword, followed by the name of the new type and any type arguments. The type's constructors are defined after the equals symbol, and are separated by pipe characters (`|`).
387+
An algebraic data type is introduced using the `data` keyword, followed by the name of the new type and any type arguments. The type's constructors (i.e. its _data constructors_) are defined after the equals symbol, and are separated by pipe characters (`|`).
388388

389389
Let's see another example from PureScript's standard libraries. We saw the `Maybe` type, which is used to define optional values, earlier in the book. Here is its definition from the `maybe` package:
390390

0 commit comments

Comments
 (0)