28 Oct
2006
28 Oct
'06
1:31 a.m.
Anyone know of a good source for learning about higher ranked types? I'm not quite sure why this is illegal...
foo :: Integer -> (forall a. Show a => a) foo 2 = ["foo"] foo x = x
...while this is just fine...
bar :: Integer -> (forall a. Show a => a->b) -> b bar 2 k = k ["bar"] bar x k = k x
Thanks, Greg Buchholz