
Hello Thorkil, Wednesday, March 29, 2006, 2:15:05 AM, you 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? 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.
primitives work with just the same internal structures. i thinl that only real advantage of adding primop instead of adding FFI import is that PrimOps.cmm contains already implemented wrappers for calling GMP functions while for FFI you should implement them from scratch -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com