From: sof Date: Fri, 26 Oct 2001 00:53:56 +0000 (+0000) Subject: [project @ 2001-10-26 00:53:56 by sof] X-Git-Tag: Approximately_9120_patches~694 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=40f19c21363923432edd34e3e2b13639f2f7bcf1;p=ghc-hetmet.git [project @ 2001-10-26 00:53:56 by sof] Custom pre-processor documentation --- diff --git a/ghc/docs/users_guide/flags.sgml b/ghc/docs/users_guide/flags.sgml index 21bf3a4..0d6ffba 100644 --- a/ghc/docs/users_guide/flags.sgml +++ b/ghc/docs/users_guide/flags.sgml @@ -1164,6 +1164,13 @@ static - + + cmd + Use cmd as the pre-processor + (with only) + static + - + @@ -1174,6 +1181,7 @@ + diff --git a/ghc/docs/users_guide/phases.sgml b/ghc/docs/users_guide/phases.sgml index 3454483..e7f4694 100644 --- a/ghc/docs/users_guide/phases.sgml +++ b/ghc/docs/users_guide/phases.sgml @@ -206,6 +206,62 @@ strmod = "\ and the string gap works as expected. + + 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. + + + + + + Options affecting the C compiler (if applicable)