nhc98-1.00 bug report



About this list Date view Thread view Subject view Author view

Thomas Hallgren (hallgren@cs.chalmers.se)
Sun, 19 Nov 2000 19:35:09 +0100


Hi, I downloaded nhc98-1.00 the other day, to use nhc's powerful heap profiling to find a space leak in a program. However, after applying the patches available on nhc's web page, I still encountered what appears to be three different bugs that prevented me from compiling the program of interest. The first two bugs were easy to work around, but I don't know what to do about the third one. The program I tried to compile is about 10000 lines long, and works fine with hbc, ghc and hugs. I have managed to isolate small examples that exhibit the three bugs in nhc: Bug #1. Compiling the following module module NewtypeBug where newtype T a = C a gives Fail: Couldn't find rhs of newtype: NewtypeBug.T Two conflicting datatype definitions? but by using "data" instead of "newtype", the problem can be avoided. Bug #2.Compiling the following module module RebindBug where f = x where (x,_) = (x,()) where x = () -- This doesn't work either: --(x,_) = (x,()) where x = () gives Fail: arityI InfoVar 155 RebindBug.Prelude.155.x (infixl{-def-} ,9) IEnone -- no type -- Nothing but by renaming one of the variables called x, the problem can be avoided. Bug #3. Compiling the following module 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)]) but by removing the type signatures, the problem can be avoided. However, in the program I tried to compile, the functions were of course more complicated, and really overloaded (in a different type class), and also relied on polymorphic recursion, so the type signatures could not be removed! Regards, Thomas Hallgren


About this list Date view Thread view Subject view Author view