forall a (Ord a => a-> a) -> Int is an illegal type???

Brian Hulley brianh at
Thu Feb 9 01:29:04 EST 2006

Hi -
I've been puzzling over section of the ghc users manual for the past 
few months (!) and still can't understand why the following is an illegal 

forall a. ((Ord a => a-> a) -> Int)


(forall a. Ord a => a->a) -> Int

is legal. I can understand why the second one *is* legal but I can't seem to 
understand why the first syntax is not just exactly the same thing even 
though the parse tree is different.

Can anyone shed some light on this?

Thanks, Brian.

More information about the Glasgow-haskell-users mailing list