[Hat] Hat bug report: Ambiguous occurrence `List'
Fergus Henderson
fjh007 at galois.com
Mon Jun 28 20:34:58 EDT 2004
On 23-Jun-2004, Malcolm Wallace <Malcolm.Wallace at cs.york.ac.uk> wrote:
> > The main problem here seems to be that Hat doesn't support the "Data.Word" module.
> > Is there any simple work-around? I'm not particularly interested in tracing
> > that module.
>
> I have just checked into CVS a tracing version of Data.Word.
Thanks!
> It compiles, but I haven't tested it. Currently it provides instances of
> Eq, Ord, Bounded, Num, Enum, Read, Show
> but omits instances of
> Real, Integral, Ix
> because of tedious errors I haven't tracked down. If you need those
> instances, I'll look into it further.
It turns out that I do need at least the Integral instances.
I tried uncommenting those, and got an error about "fromRational" being
undeclared. I then tried adding "import Prelude(fromRational)" to
src/hatlib/Data/Word.hs, but that didn't work. I ran into the following
problem:
| bash$ make
| cd src/hatlib; make HC=ghc6 all
| make[1]: Entering directory `/home/fjh007/hat/cvs/hat/src/hatlib'
| /home/fjh007/hat/cvs/hat/script/hat-trans -P. -I. -trusted -prelude -D__GLASGOW_HASKELL__=620 Data/Word.hs
|
| Fail: AuxLabelAST.letVar: == not let-bound in env
The build continued a little longer,
| ghc6 -package-name hat -fglasgow-exts -package lang -package base -fno-warn-overlapping-patterns -fno-warn-missing-methods -i/home/fjh007/hat/cvs/hat/targets/ix86-Linux/obj/hatlib/ghc6 -I. -I/home/fjh007/hat/cvs/hat/include '-#include "hat-c.h"' -c -o /home/fjh007/hat/cvs/hat/targets/ix86-Linux/obj/hatlib/ghc6/Hat/Data/Word.o Hat/Data/Word.hs
|
| Hat/Data/Word.hs:1:
| The main function `main' is not defined in module `Main'
| make[1]: *** [/home/fjh007/hat/cvs/hat/targets/ix86-Linux/obj/hatlib/ghc6/Hat/Data/Word.o] Error 1
but I think the first error message is the one that is really causing the problem.
Cheers,
Fergus.
--
Fergus J. Henderson | "I have always known that the pursuit
Galois Connections, Inc. | of excellence is a lethal habit"
Phone: +1 503 626 6616 | -- the last words of T. S. Garp.
-------------- next part --------------
Index: src/hatlib/Data/Word.hs
===================================================================
RCS file: /cvs/hat/src/hatlib/Data/Word.hs,v
retrieving revision 1.2
diff -u -r1.2 Word.hs
--- src/hatlib/Data/Word.hs 23 Jun 2004 14:27:07 -0000 1.2
+++ src/hatlib/Data/Word.hs 29 Jun 2004 00:27:17 -0000
@@ -8,6 +8,7 @@
import qualified TraceOrigData.Word
import TraceOrigIx
import Ix
+import Prelude(fromRational)
#define INSTANCE_EQ(T) \
; foreign import haskell "Prelude.==" eq/**/T :: T -> T -> Bool \
@@ -113,7 +114,6 @@
INSTANCE_BOUNDED(Word32)
INSTANCE_BOUNDED(Word64)
-{-
INSTANCE_REAL(Word)
INSTANCE_REAL(Word8)
INSTANCE_REAL(Word16)
@@ -126,6 +126,7 @@
INSTANCE_INTEGRAL(Word32)
INSTANCE_INTEGRAL(Word64)
+{-
INSTANCE_IX(Word)
INSTANCE_IX(Word8)
INSTANCE_IX(Word16)
More information about the Hat
mailing list