[Haskell-cafe] Mixing C and Haskell code in the same file

Maurí­cio briqueabraque at yahoo.com
Fri Jul 10 09:24:51 EDT 2009

Is it possible to insert C code directly to, say,
.hsc files? I see this construct in ghc user docs:

#def ...

which should insert definitions, but I could not
find examples of usage in Hackage. My goal is to
write some cpp macros that build both a C function
and its 'foreign import ccall' wrapper in the same

Thanks for your help,

More information about the Haskell-Cafe mailing list