22 Apr
2003
22 Apr
'03
2:47 p.m.
Hello Paul,
Of these I think that (3) is most serious. What I do is tell students that a data type declaration such as:
data Tree a = Bin (Tree a) a (Tree a) | Nil
is really a kind of shorthand for:
data Tree a where Bin :: Tree a -> a -> Tree a -> Tree a Nil :: Tree a
I like this. And it solves both (3) and (1) (because the bars are gone). Thanks, Arjan