|
|
|
|
|
by roenxi
2405 days ago
|
|
I'm guessing at least a majority of the readers are like me and don't know Haskell, so on behalf of the confused: data Nat = Z | Suc Nat
^ What does this crazy construction mean syntactically?It looks like it is trying to do something like (from your link) Coq's Inductive nat : Type :=
| zero : nat
| succ : nat -> nat.
But obviously defining natural numbers in terms of Z/the integers doesn't work because I could then call -1 a natural number. |
|