RE: adding new primitives to ghci...

I am trying to add a new primitive to ghc (5.04.1) ... I followed the instructions in primops.txt.pp:
-- - or, for an out-of-line primop: -- ghc/includes/PrimOps.h (just add the declaration) -- ghc/rts/PrimOps.hc (define it here) -- ghc/rts/Linker.c (declare the symbol for GHCi) --
My new primitive works fine when I compile the programs that use it but when I try to load ghci I get:
lxdsg[137](2.05)> ./ghc-inplace --interactive ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 5.04.1, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... /data/dubois/ghc-5.04.1/libraries/base/HSbase.o: unknown symbol `packcczh_fast' ghc-5.04.1: panic! (the `impossible' happened, GHC version 5.04.1): can't load package `base'
Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org, or http://sourceforge.net/projects/ghc/.
You need to bootstrap GHCi with the compiler that contains the new primitive. Cheers, Simon
participants (1)
-
Simon Marlow