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

Bulat Ziganshin bulatz at HotPOP.com
Thu Feb 9 01:57:01 EST 2006


Hello Brian,

Thursday, February 09, 2006, 9:38:35 AM, you wrote:

>> the past few months (!) and still can't understand why the following
>> is an illegal type:
>>
>> forall a. ((Ord a => a-> a) -> Int)

i don't know right answer burt may be because "Ord a" restriction and
"forall a" )"dseclaration" of type variable) should be at the same
"level". imagine the following declaration:

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

it is not good to write restriction on some deep level instead of
right together with "declaration"



-- 
Best regards,
 Bulat                            mailto:bulatz at HotPOP.com





More information about the Glasgow-haskell-users mailing list