
29 May
2010
29 May
'10
3:35 p.m.
Hi all, I was wondering if someone could give me an intuitive explanation of why in f :: forall a.(Show a) => a -> String f x = show x "forall a.(Show a) => a" appears to translate into "Any a, as long as it is an instance of Show" but if I use forall in an type qualifier in an assignment: myList = [] :: [forall a.(Show a) => a] "forall a.(Show a) => a" seems to mean "Any a, as long as it is bottom" I've been poring over http://en.wikibooks.org/wiki/Haskell/Existentially_quantified_types for the last hour and I feel like my eyes are starting to melt. As usual, any input would be warmly received :) All the best, Philip