
18 Aug
2007
18 Aug
'07
1:39 p.m.
Arie Peterson wrote:
For example, when I write 'someTree < otherTree' the compiler shouts at me and helps me realise that I actually meant 'height someTree < height otherTree'. This mechanism fails once I need trees to be keys in a map. My current solution (newtypes) is far from ideal.
This seems a bit anal to me. If you really are worried about such things it's probably best to avoid using lists too, or you might end up writing (xs < ys) instead of (length xs < length ys) Regards -- Adrian Hey