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)
Wed, 22 Nov 2000 15:35:50 +0000


> Bug #4. > module A where > a = True > > module B where > import qualified A(a) > b = A.a > gives > ==================================== > Error when renaming:: > Identifier a used at 2:20 is not defined. (in overlap resolution) Yes, this is a bug. It is not actually necessary to mention (a) in the qualified import, because import qualified A import qualified A () import qualified A (a) import qualified A (a,b,c) all mean the same thing - that all identifiers from A are visible with qualified names. The explicit list of identifiers is redundant - although it is of course checked by the compiler for consistency. Another workaround for this bug is to qualify items in the list: import qualified A (A.a) This is not legal Haskell'98, but is accepted by both ghc and nhc98. > /usr/local/lib/nhc98/ix86-Linux/Preludep.a(StablePtr.o)(.data+0x1bc): > undefined reference to `PM_StablePtr' Ok, this bug is a problem of an unfortunate interaction between the compiler flags used to build parts of the standard library modules, and the actual module names declared within those files. Here is a fix: Edit all the files in src/prelude/FFI/*.hs, changing all the module headers to: module FFI where Then 'make prelude' and 'make profile'. Finally, copy the new interface file src/prelude/FFI/FFI.hi to overwrite the existing file include/FFI.hi. Then 'make install' if you wish. Regards, Malcolm


About this list Date view Thread view Subject view Author view