Hello, Given the fact that Haskell 98 demands that class constraints in an explicit type are in a normal form (either a variable, or a type variable applied to a list of types), it struck me that in the following (not very useful) program ghci yields a type which is not of that form. class X a where (><) :: a -> a -> Bool class Y a where (<>) :: a -> a -> Bool _ <> _ = True instance Y a => X [a] where x >< y = not(head x <> head y) --f :: Y a => a -> a -> Bool f g h = [g] >< [h] Now, in ghci :t f yields f :: forall t. (X [t]) => t -> t -> Bool Hugs does reduce the type of f to the explicit type in comments. My question is: is there any special reason for this behaviour? Jur -- http://www.cs.uu.nl/people/jur/progrock.html -- jur@cs.uu.nl If e-mail does not work try jurriaanhage@hotmail.com
participants (1)
-
Jurriaan Hage