[cvs-nhc98] Type checking bug in nhc98

Sven Panne Sven.Panne at aedion.de
Sun Jun 13 06:32:51 EDT 2004


Consider the following module:

------------------------------------
module Foo where

bar :: Int -> (Int, Int)
bar z = (z, len)
    where (len, _) = baz 0
          baz n = (n, [])
------------------------------------

The current nhc98 from HEAD tells me:

======	Errors after type inference/checking:
Context for Prelude.Num needed in left hand pattern at 5:10.


GHC and Hugs accept this without problems, nhc98 only when it gets some
help, e.g. changing "0" to "(0::Int)".

Cheers,
    S.



More information about the Cvs-nhc98 mailing list