From 44deff77bb19105571fba6559fd62b8ddf127af6 Mon Sep 17 00:00:00 2001 From: David Waern Date: Mon, 7 Jan 2008 16:32:26 +0000 Subject: Update the "Using literate or pre-processed source" section --- doc/haddock.xml | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'doc/haddock.xml') diff --git a/doc/haddock.xml b/doc/haddock.xml index 3e98e35f..18db92d4 100644 --- a/doc/haddock.xml +++ b/doc/haddock.xml @@ -788,29 +788,12 @@
Using literate or pre-processed source - Haddock only accepts plain, non-literate, Haskell source. - This means that if you program in Literate Haskell, or you need - to use the C pre-processor in your Haskell source, then you need - to pre-process the files before feeding them to Haddock. This - is easily accomplished using GHC; for example, suppose we have a - Literate Haskell source file Foo.lhs, on - which we also need to run the C pre-processor: - - -$ ghc -cpp -E -optP-P -D__HADDOCK__ Foo.lhs -o Foo.hs -$ haddock -h Foo.hs ... - - - The option to GHC says "stop after - pre-processing", the option turns on the C - pre-processor, the option tells the C - pre-processor not to leave any extra dropping behind (see the - description of the option in the gcc manual - for details), and the option - defines the symbol __HADDOCK__ when - pre-processing (this is sometimes handy if you need to any - pre-processing conditionals in your source which depend on - whether the source is going to be fed to Haddock). + Since Haddock uses GHC internally, both plain and + literate Haskell sources are accepted without the need for the user + to do anything. To use the C pre-processor, however, + the user must pass the the option to GHC + using . +
-- cgit v1.2.3