
20 Dec
2001
20 Dec
'01
10:49 a.m.
I think that in
module Q where Just a = if 5 == 5 then Just 6 else Nothing
(which gives me
====== Errors after type inference/checking: Context for Prelude.Num needed in left hand pattern at 4:3.
) nhc should default the type of a to Integer, and ghc and hugs seem to agree.
Yes, this should be defaulted to Integer via the monomorphism restriction, but nhc98 does not implement the DMR. It is a documented feature/bug. Regards, Malcolm