adding new primitives to ghci...

Andre Rauber Du Bois dubois@macs.hw.ac.uk
Wed, 20 Nov 2002 12:12:05 +0000 (GMT)


	Hello!

	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/.


	So, is there any other file that I have to change to have my new 
primitive working with ghci? 

	Cheers,

Andre.
-- 
---------------------------------
André Rauber Du Bois
dubois at macs.hw.ac.uk
http://www.macs.hw.ac.uk/~dubois/