From 3f53ee2e42c180a34fb7dd506d33da56aa8221d1 Mon Sep 17 00:00:00 2001 From: Angus Lepper <angus.lepper@gmail.com> Date: Sun, 24 May 2015 22:03:47 +0100 Subject: [PATCH] Document 'extensions' field replacements Resolves #2401. --- Cabal/doc/developing-packages.markdown | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Cabal/doc/developing-packages.markdown b/Cabal/doc/developing-packages.markdown index 82a0ac6bb6..b91352ccb5 100644 --- a/Cabal/doc/developing-packages.markdown +++ b/Cabal/doc/developing-packages.markdown @@ -1334,21 +1334,22 @@ values for these fields. For backwards compatibility, the old variant `hs-source-dir` is also recognized. -`extensions:` _identifier list_ -: A list of Haskell extensions used by every module. Extension names - are the constructors of the [Extension][extension] type. These - determine corresponding compiler options. In particular, `CPP` specifies that - Haskell source files are to be preprocessed with a C preprocessor. - - Extensions used only by one module may be specified by placing a - `LANGUAGE` pragma in the source file affected, e.g.: +`default-extensions:` _identifier list_ +: A list of Haskell extensions used by every module. These determine + corresponding compiler options enabled for all files. Extension names are + the constructors of the [Extension][extension] type. For example, `CPP` + specifies that Haskell source files are to be preprocessed with a C + preprocessor. + +`other-extensions:` _identifier list_ +: A list of Haskell extensions used by some (but not necessarily all) modules. + From GHC version 6.6 onward, these may be specified by placing a `LANGUAGE` + pragma in the source files affected e.g. ~~~~~~~~~~~~~~~~ {-# LANGUAGE CPP, MultiParamTypeClasses #-} ~~~~~~~~~~~~~~~~ - Note: GHC versions prior to 6.6 do not support the `LANGUAGE` pragma. - `build-tools:` _program list_ : A list of programs, possibly annotated with versions, needed to build this package, e.g. `c2hs >= 0.15, cpphs`.If no version -- GitLab