Thorkil Naur wrote:
rm -f GHC/PrimopWrappers.o; if [ ! -d GHC/PrimopWrappers_split ]; then mkdir GHC/PrimopWrappers_split; else /usr/bin/find GHC/PrimopWrappers_split -name '*.o' -print | xargs rm -f __rm_food; fi; ../../ghc/compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude -"#include" HsBase.h -funbox-strict-fields -ignore-package base -O -Rghc-timing -fgenerics -fgenerics -split-objs -c GHC/PrimopWrappers.hs -o GHC/PrimopWrappers.o -ohi GHC/PrimopWrappers.hi
GHC/PrimopWrappers.hs:133:29: Not in scope: `GHC.Prim.quotInteger2Exp#' <<ghc: 32263284 bytes, 4 GCs, 97412/97412 avg/max bytes residency (1 samples), 16M in use, 0.00 INIT (0.00 elapsed), 0.12 MUT (0.19 elapsed), 0.02 GC (0.04 elapsed) :ghc>> make[2]: *** [GHC/PrimopWrappers.o] Error 1 make[1]: *** [all] Error 1 make[1]: Leaving directory `/home/tn/tn/Haskell/ghc/unpack/ghc-6.4.1/libraries' make: *** [build] Error 1
So, evidently, it is not as easy to add new primitive operations as I thought. (Or, which is most likely, but embarrasingly, closer to the truth: I am not as clever as I thought I was.)
I think you probably just haven't recompiled enough stuff after adding the primop. I can't tell immediately whether it's the compiler that is out of date, or an interface file in libraries/base. To be on the safe side, you could 'make clean' in ghc/compiler and libraries/base, then rebuild both. Cheers, Simon