[[project @ 2001-10-26 00:53:56 by sof]
sof**20011026005356
Custom pre-processor documentation
] {
hunk ./ghc/docs/users_guide/flags.sgml 1167
+
+ cmd
+ Use cmd as the pre-processor
+ (with only)
+ static
+ -
+
hunk ./ghc/docs/users_guide/flags.sgml 1184
+
hunk ./ghc/docs/users_guide/phases.sgml 208
+
+
+ Options affecting a Haskell pre-processor
+
+ pre-processing: custom
+ Pre-processor options
+
+
+
+
+
+
+ A custom pre-processor is run over your Haskell
+ source file only if the option
+ -F is given.
+
+
+ Running a custom pre-processor at compile-time is in some
+ settings appropriate and useful. The
+ option lets you run a pre-processor as part of the overall
+ GHC compilation pipeline, which has the advantage over
+ running a Haskell pre-processor separately in that it
+ works in interpreted mode and you can continue to take
+ reap the benefits of GHC's recompilation checker.
+
+
+ The pre-processor is run just before the Haskell
+ compiler proper processes the Haskell input, but after
+ the literate markup has been stripped away and (possibly)
+ the C pre-processor has washed the Haskell input.
+
+
+
+
+ cmd
+ cmd
+
+ Use cmd as the Haskell
+ pre-processor. When invoked, the
+ cmd pre-processor is given at
+ least three arguments on its command-line: the first
+ argument is the name of the original source file, the second
+ is the name of the file holding the input, and the third is
+ the name of the file where
+ cmd should write its output to.
+
+ Additional arguments to the
+ cmd pre-processor can be passed
+ in using the option. These are fed to
+ cmd on the command line after the
+ three standard input and output arguments.
+
+
+
+
+
}