Re: nhc98-1.00 bug report



About this list Date view Thread view Subject view Author view

Malcolm Wallace (malcolm-nhc@cs.york.ac.uk)
Mon, 20 Nov 2000 18:47:21 +0000


Thomas, Thanks for the bug reports. > Bug #1. > module NewtypeBug where > newtype T a = C a > gives > Fail: Couldn't find rhs of newtype: NewtypeBug.T > Two conflicting datatype definitions? This kind of renaming looks strange to me, but it appears to be legal, so I have fixed nhc98 to accept it. > Bug #2. > module RebindBug where > f = x where > (x,_) = (x,()) > where x = () Once again, I am not sure exactly what this is supposed to mean. My intuition says f = let x = () -- this defn redundant in let (x,_) = (x,()) in x but the Report says f = let (x,_) = let x = () in (x,()) -- this defn not redundant in x which does look much like the `where' version at all if you ask me. Anyway, I don't yet have a bugfix for this one, but it shouldn't be too difficult. > Bug #3. > module TypeSigBug where > f :: Functor m => m () > f = g > g :: Functor m => m () > g = f > gives > ==================================== > Error after type deriving/checking: > No default for Prelude.Functor at 7:1.(162,[(15,168)]) > No default for Prelude.Functor at 4:1.(165,[(15,167)]) This is a more serious bug. We don't entirely understand the typechecker in nhc98, and the reason for this error message is not at all clear. There appear to be several other obscure bugs in typechecking as well, so we are not sure if and when we can fix this particular one. As a workaround, it is not necessary to remove *all* the type signatures. For the small example you gave, it is sufficient to remove only one. Sorry for the bad news, but we'll continue looking at it. Regards, Malcolm


About this list Date view Thread view Subject view Author view