From: simonmar Date: Tue, 11 Jan 2005 16:06:58 +0000 (+0000) Subject: [project @ 2005-01-11 16:06:56 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1264 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=55d795e2ca8f0c97e3002d4eb528862dd9d44e55;p=ghc-hetmet.git [project @ 2005-01-11 16:06:56 by simonmar] Rename OPTIONS to OPTIONS_GHC. --- diff --git a/ghc/docs/users_guide/glasgow_exts.xml b/ghc/docs/users_guide/glasgow_exts.xml index da22a15..0e19d42 100644 --- a/ghc/docs/users_guide/glasgow_exts.xml +++ b/ghc/docs/users_guide/glasgow_exts.xml @@ -4373,16 +4373,19 @@ key_function :: Int -> String -> (Bool, Double) - OPTIONS pragma - OPTIONS + OPTIONS_GHC pragma + OPTIONS_GHC - pragmaOPTIONS + pragmaOPTIONS_GHC - The OPTIONS pragma is used to specify + The OPTIONS_GHC pragma is used to specify additional options that are given to the compiler when compiling this source file. See for details. + + Previous versions of GHC accepted OPTIONS rather + than OPTIONS_GHC, but that is now deprecated. diff --git a/ghc/docs/users_guide/using.xml b/ghc/docs/users_guide/using.xml index bbf539a..e1a5ab7 100644 --- a/ghc/docs/users_guide/using.xml +++ b/ghc/docs/users_guide/using.xml @@ -51,35 +51,35 @@ ghc [argument...] option. Rather than maintaining the list of per-file options in a Makefile, it is possible to do this directly in the source file using the - OPTIONS pragma OPTIONS + OPTIONS_GHC pragma OPTIONS_GHC pragma: -{-# OPTIONS -fglasgow-exts #-} +{-# OPTIONS_GHC -fglasgow-exts #-} module X where ... - OPTIONS pragmas are only looked for at + OPTIONS_GHC pragmas are only looked for at the top of your source files, upto the first (non-literate,non-empty) line not containing - OPTIONS. Multiple OPTIONS + OPTIONS_GHC. Multiple OPTIONS_GHC pragmas are recognised. Note that your command shell does not get to the source file options, they are just included literally in the array of command-line arguments the compiler driver maintains internally, so you'll be desperately disappointed if - you try to glob etc. inside OPTIONS. + you try to glob etc. inside OPTIONS_GHC. - NOTE: the contents of OPTIONS are prepended to the + NOTE: the contents of OPTIONS_GHC are prepended to the command-line options, so you do have the - ability to override OPTIONS settings via the command + ability to override OPTIONS_GHC settings via the command line. It is not recommended to move all the contents of your Makefiles into your source files, but in some circumstances, the - OPTIONS pragma is the Right Thing. (If you + OPTIONS_GHC pragma is the Right Thing. (If you use and have OPTION flags in - your module, the OPTIONS will get put into the generated .hc + your module, the OPTIONS_GHC will get put into the generated .hc file). @@ -102,7 +102,7 @@ module X where Each of GHC's command line options is classified as either static or dynamic. A static flag may only be specified on the command line, whereas a - dynamic flag may also be given in an OPTIONS + dynamic flag may also be given in an OPTIONS_GHC pragma in a source file or set from the GHCi command-line with :set. @@ -354,7 +354,7 @@ ghc ––make Main.hs , but note that any options you give on the command line will apply to all the source files compiled, so if you want any options to apply to a single source - file only, you'll need to use an OPTIONS + file only, you'll need to use an OPTIONS_GHC pragma (see ). If the program needs to be linked with additional objects