2017-07-23 Building inline-c projects just got a lot easier

TL;DR: the latest version of inline-c , 0.6.0.0 , does not require manual specification of generated C files. Moreover, ghci now works, provided you use -fobject-code . The build process as a whole is much more reliable.

GHC 8.2.1 just came out, and it contains a new template Haskell function that I added specifically to make inline-c more of a first-class citizen: addForeignFile .

This function lets you emit bits of foreign code that will be linked with the object code for the current module.

The new inline-c now uses this function, which means that compiling Haskell code with inline C expressions will “just work”, without compiling the generated C files explicitly or without specifying the generated C files in the cabal file.