> Sorry to be so dense, but my question was about the syntax of the
> -#include flag - where does it go (commandline? in the source? in a
> pragma?), and how is the filename specified?
> -#include="filename"
> -#include "filename"
> -#include <filename>
> etc. The on-line GHC documentation (section 6.5.1) is far from clear
> on how to actually use it.
Either of the second two options for the syntax. As for where you put it,
it can either go on the command line, or in the source like this:
{-# OPTIONS -#include "foo.h" #-}
at the top of the file, before any Haskell code. These OPTIONS pragmas are
useful for options that relate specifically to this source file, such as
-fglasgow-exts, -fallow-undecidable-instances,
-fno-warn-overlapping-patterns and so on.
Cheers,
Simon