Ryan Newton rrnew...@gmail.com wrote:
My problem is that I can't create a type representing what I want at
the Haskell type-check time, and I need such a type for either
casting or a foreign import. For example, let's say the function
takes a number of Int arguments between 1 and 1000. If I
Considering that the GHC FFI is already built on libffi (I'm reasonably
sure) it seems unnecessary for the Hackage library to depend on an external
version. Is it not already getting linked in?
On Sun, Feb 17, 2013 at 6:53 PM, Ryan Newton rrnew...@gmail.com wrote:
The scenario is pretty
Quoth Ryan Newton rrnew...@gmail.com,
The scenario is pretty simple. I generate C code at runtime. I compile it
to a .so. I know how many arguments it expects (but only at runtime), and
I get a FunPtr back from 'dlsym'. How do I call it?
I was hoping there would be some Raw lower level
The scenario is pretty simple. I generate C code at runtime. I compile
it
to a .so. I know how many arguments it expects (but only at runtime),
and
I get a FunPtr back from 'dlsym'. How do I call it?
I feel that I might be confused about the problem, but since I don't
see anyone
Quoth Ryan Newton rrnew...@gmail.com,
...
Anyway, in this case it wasn't *too *painful to just generate a bunch of
extra boilerplate C functions for (1) creating a data structure to hold the
arguments, (2) loading them in one at a time, and (3) deallocating the
structure when the call is done.