[Haskell-cafe] FFI and struct arguments

Felipe Lessa felipe.lessa at gmail.com
Thu Jul 17 12:36:18 EDT 2008

On Thu, Jul 17, 2008 at 12:37 PM, Bayley, Alistair
<Alistair.Bayley at invesco.com> wrote:
> -- inline your *vect->vect wrapper (ends up in generated .c file)
> #def void funcWrapper(vect *v) { func(*v); }
> foreign import stdcall funcWr unsafe "funcWrapper" :: VectorC -> IO ()

I am using hsc2hs currently, but googling about #def with Cabal I
found out that some people were having trouble to make Cabal discover
that hsc2hs had created a new C file. Specifically, bug #245 [1] which
says that the milestone is undefined. So for now I'm creating a
wrapper.[ch] myself.

[1] http://hackage.haskell.org/trac/hackage/ticket/245


More information about the Haskell-Cafe mailing list