
I found this interesting page https://wiki.haskell.org/Peano_numbers at Wiki Haskell. Confusing, however, is how it first establishes data Peano = Zero | Succ Peano It says Here Zero and Succ are values (constructors). Zero has type Peano, and Succ has type Peano -> Peano. but then it breaks down each member further a few lines later data Zero data Succ a and then says Zero has kind *, and Succ has kind * -> *. The natural numbers are represented by types (of kind *) Zero, Succ Zero, Succ (Succ Zero) etc. Why is it giving two separate treatments and what is meant by the * and * -> * ? There's something fundamental I'm missing. If anyone knows of a really thorough and definitive *and *understandable treatment of Haskell types, I'd appreciate it. LB