ffihugs [+G] [option...] [+Lcc-option...] file
Suppose you have some C functions in test.c and some ffi declarations for those functions in Test.hs and the code in test.c needs to be compiled with -lm. To use these with Hugs, you must first use ffihugs to generate Test.c, compile it and link it against test.c with -lm to produce Test.so:
ffihugs +G +L"test.c" +L"-lm" Test.hs |
hugs Test.hs |