[jhc] support for imported doubles/floats?

Mark Wotton mwotton at gmail.com
Sun Aug 16 03:34:54 EDT 2009


maybe a known issue, but I can't seem to import functions involving C  
floats or doubles:

17:33[1] ~ % cat RubyMap.hs
{-# LANGUAGE ForeignFunctionInterface #-}
import Foreign.C.Types	
foreign import ccall unsafe "foo.h somedub" somedub :: CDouble
17:33 ~ % ~/src/jhc/jhc RubyMap.hs
jhc RubyMap.hs
jhc 0.6.2 (-n krasyupheasy-5
)
Finding Dependencies...
Using Ho Cache: '/Users/mwotton/.jhc/cache'
Loading libraries: ["base","haskell98"]
Library: base-1.0        </usr/local/share/jhc-0.6/base-1.0.hl>
Library: haskell98-1.0   </usr/local/share/jhc-0.6/haskell98-1.0.hl>
RubyMap.hs:1   - Warning: The pragma 'LANGUAGE' is unknown
Main                    [RubyMap.hs]
Typechecking...
[1 of 1] Main              
(.............................................)
Compiling...
[1 of 1] Main             user error (lookupExtTypeInfo: (ELit  
(Foreign.C.Types.CDouble::ESort *),ELit  
(Foreign.C.Types.CDouble::ESort *)))


if this is spamming, please let me know and i'll stop, but I'd really  
like to be able to use JHC in Hubris.

mark


More information about the jhc mailing list