
4 Jun
2003
4 Jun
'03
4:33 p.m.
Malcolm Wallace wrote:
foreign import ccall "math.h signgam" signgamC :: IO Int
signgam is an "int" variable, but this assumes that it is a function of type "int signgam(void)".
Write a C wrapper "int get_signgam(void) { return signgam; }" and import that.
Or alternatively, foreign import the address of the int and read it directly with 'peek'.
Thanks for the clarification. I went with the second option, and that works great. -- Matthew Donadio (m.p.donadio@ieee.org)