hugs ffi - question thats been bugging me for some time
Alastair Reid
reid@cs.utah.edu
13 Jun 2002 01:48:48 +0100
The ffi specification changed after this documentation was written.
What we used to call foreign export dynamic is now called foreign
import wrapper. It made sense at the time but I won't even try to
explain it because the new terminology makes much more sense.
I'm in the process of bringing the ffi into line with the current spec.
--
Alastair Reid Reid Consulting (UK) Ltd
>>>>> "R" == R Legere <legere@adelpia.net> writes:
> In docs/ffi-notes.txt, I find the following:
> ------------------------------------------------------------ o
> foreign export static is not implemented.
> You can code around this by writing:
> foreign import dynamic foo_dynamic :: Addr -> (A -> B -> C)
> foreign label foo_addr :: Addr foo = foo_dynamic foo_addr
> instead of:
> foreign import foo :: A -> B -> C
> -------------------------------------------------------------------------
> Does anyone understand what this is saying? I can't grok it. The
> work around presented here seems to have nothing to do with foriegn
> export static. It looks like a workaround to not having foreign
> IMPORT static. (Which we of course dont need a workaround for :)).
> Is something extremely tricky going on or am i just dense?
> Anyway, just curious, I have not had any trouble working around by
> passing pointers to the C-side using foreign export dynamic. I have
> just wondered about this for a long long time :)