
Neil Mitchell wrote:
Hi
I was trying to add a primitive function for which I modified Prelude.hs, Prelude.c and Primitive.hs. I rebuilt the prelude using 'yhc -c - redefine -prelude' and then did an scons, but I got the following error:
Recently the flag format changed, you must use two --'s for long options
yhc -c --redefine --prelude Actually, my version is a couple months old, and it builds with a single '-'. I tried with --, and everything is as before: the Prelude builds, but the main scons fails with the below error. How do I resolve that? Thanks.
scons: Reading SConscript files ... Building version 0.7.0-20070215041026-custom. Checking for architecture... x86 Checking for operating system... linux2 Adding '-g3' to CCFLAGS. Checking for Subversion binary... "svn" Checking for Subversion version... Found version 1.4.0. Checking for GHC binary... "ghc" Checking for GHC version 6.4.1 or later... Found version 6.6. Checking for C header file gmp.h... yes Checking for mpz_t integ; mpz_init (integ) in C library gmp... yes Checking for libgmp version... 4.2.1 Bootstrapping... Done. scons: done reading SConscript files. scons: Building targets ... YHC_build(["src/packages/yhc-base-1.0/Foreign/Word.hbc"], ["src/packages/yhc-base-1.0/Foreign/Word.hs"]) inst/bin/yhc -core -cpp -c src/packages/yhc-base-1.0/Foreign/Word.hs Compiling Foreign.Word ( src/packages/yhc-base-1.0/Foreign/Word.hs ) ***instanceI(2) InfoUsed (Id 154) [(Type class,Integral,"oitaR.ataD",1041:16-1041:23)]
yhc: The class Integral has no instance for the type Prelude.Integer. Possible sources for the problem are: 102:713 When type checking declarations at: 102:686-102:715
scons: *** [src/packages/yhc-base-1.0/Foreign/Word.hbc] Error 1 scons: building terminated because of errors. kart@enlightenment:~/yhc>
I undid all the changes I made, and I still get this error. I did not change anything related to Integral or Integer AFAIK and I didn't even open the Word.hs file, and the Prelude still has the instance declaration (instance Integral Integer where...).
How do I resolve this error? I don't want to do an scons fullclean because I'm working on a modified version of yhc. I haven't come across this error before that I remember, and I was able to build and pass the unit tests with no problem till this happened. Thanks for your help.
-- Blogs: http://kartik-log.blogspot.com, http://randomkart.blogspot.com
_______________________________________________ Yhc mailing list Yhc@haskell.org http://www.haskell.org/mailman/listinfo/yhc
-- Blogs: http://kartik-log.blogspot.com, http://randomkart.blogspot.com