Message "GHC/PrimopWrappers.hs:133:29: Not in scope: `GHC.Prim.quotInteger2Exp#'" building GHC with additional primitive operation

Thorkil Naur naur at post11.tele.dk
Tue Mar 28 17:15:05 EST 2006


On Monday 27 March 2006 16:33, Bulat Ziganshin wrote:
> Thorkil, i can't understand why you can't just use FFI to import
> functions you required? why you need to patch the PrimOps list?
Hello,

As I wrote earlier, using FFI is also a candidate for getting access to 
additional GMP functions. However, presently, I am not aware of a method of 
doing this that does not involve some potentially significant additional 
overhead. After all, Haskell Integers are not directly supported in C, so 
some sort of marshalling and/or intricate access to internal GHC Haskell 
structures would seem to be required.

But, as you have perhaps seen (my reply to Simon Marlow a few minutes ago on 
the same matter), adding primitive operations turned out to be easy (at least 
if you know exactly what you are doing). In addition, I have found that this 
method with very little effort allows me to continue to write code that can 
be used both via Hugs and GHC without change.

Thanks and regards
Thorkil


More information about the Glasgow-haskell-users mailing list