Merge pull request #463 from plfa/zachrbrown-dev
Minor changes to fix #460
This commit is contained in:
commit
1c06cd319d
1 changed files with 4 additions and 5 deletions
|
@ -239,11 +239,10 @@ Including the line
|
||||||
```
|
```
|
||||||
tells Agda that `ℕ` corresponds to the natural numbers, and hence one
|
tells Agda that `ℕ` corresponds to the natural numbers, and hence one
|
||||||
is permitted to type `0` as shorthand for `zero`, `1` as shorthand for
|
is permitted to type `0` as shorthand for `zero`, `1` as shorthand for
|
||||||
`suc zero`, `2` as shorthand for `suc (suc zero)`, and so on. The
|
`suc zero`, `2` as shorthand for `suc (suc zero)`, and so on. The pragma
|
||||||
declaration is not permitted unless the type given has exactly two
|
must be given a previously declared type (in this case `ℕ`) with
|
||||||
constructors, one with no arguments (corresponding to zero) and
|
precisely two constructors, one with no arguments (in this case `zero`),
|
||||||
one with a single argument of the same type given in the pragma
|
and one with a single argument of the given type (in this case `suc`).
|
||||||
(corresponding to successor).
|
|
||||||
|
|
||||||
As well as enabling the above shorthand, the pragma also enables a
|
As well as enabling the above shorthand, the pragma also enables a
|
||||||
more efficient internal representation of naturals using the Haskell
|
more efficient internal representation of naturals using the Haskell
|
||||||
|
|
Loading…
Reference in a new issue