raw foregin imports - new backend for jhc: ghc
Ian Lynagh
igloo at earth.li
Mon Dec 4 06:55:26 EST 2006
Hi John,
On Mon, Nov 27, 2006 at 08:26:34PM -0800, John Meacham wrote:
>
> At the moment, I don't think I need anything, I was just misreading
> certain features. the ghc backend seems to be working fine with the
> following caveats:
>
> * all integral types (even Integer) are flattened to Int#.
I'm not sure I follow this - if I do
foreign import ccall "static foo.h foo" foo :: Integer -> Integer
then GHC tells me
Unacceptable argument type in foreign declaration: Integer
Unacceptable result type in foreign declaration: Integer
Can you explain what you are doing that makes Integer get flattened,
please?
> * ghc -O on my generated programs crashes with the following:
>
> ghc-6.6: panic! (the 'impossible' happened)
> (GHC version 6.6 for i386-unknown-linux):
> primRepHint:VoidRep
Another bug, thanks!
Again, this isn't something we claim should work, but it should
definitely either work or give a nice error message.
I've filed it in trac: #1037.
Thanks
Ian
More information about the Glasgow-haskell-users
mailing list