
After a long hiatus (having switched over hugs/ghc due to the *need* for rank2 polymorphic types -- hint, hint). I'm now trying to use nhc98 to compile a program that could make use of some of the Hat tracing tools. However, I'm not getting very far: Problem 1: When compiling Func.hs: module Func where import Prelude hiding ((&&),(||),not) ... I get this: nhc98 -c -o Func.o Func.hs ==================================== Error when renaming:: Identifier Prelude.&& used at 14:24 is not defined. Problem 2, when trying to compile for tracing: nhc98 -T -c -o LocalLib.T.o LocalLib.hs Fail: The class Prelude.Enum has no instance for the type Prelude.R. Possible sources for the problem are: 9:6 BTW, Are the "14:24" and "9:6" messages attempting to refer to line and columns or something totally different? I'm using the rpm for RH Linux of version 1.10. I can certainly provide more information if that's needed. Thanks. - Mark

After a long hiatus (having switched over hugs/ghc due to the *need* for rank2 polymorphic types -- hint, hint).
We'd be delighted if someone volunteered to overhaul nhc98's type checker.
When compiling Func.hs: module Func where import Prelude hiding ((&&),(||),not)
I get this: Error when renaming:: Identifier Prelude.&& used at 14:24 is not defined.
Yes, this is a rather ugly bug. Let me guess that on line 14 you have a deriving clause for one of Eq, Ord, or Ix? Unfortunately you have hidden the function Prelude.&& which is used in the derived code. As a workaround, you should add the line
import qualified Prelude ((&&))
to your module. In a future release of nhc98, we will ensure that Prelude entities introduced by the compiler are always available to it, even when they are hidden from the user's code.
Problem 2, when trying to compile for tracing:
Fail: The class Prelude.Enum has no instance for the type Prelude.R. Possible sources for the problem are: 9:6
Could you send an example source file for this bug please?
BTW, Are the "14:24" and "9:6" messages attempting to refer to line and columns or something totally different?
Yes, they are line:column references. Regards, Malcolm
participants (2)
-
Malcolm Wallace
-
Mark Tullsen