X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=797a509343704bae3ede80f7d9563fc0e511aaf2;hp=da6a125eb4a6cf30872ec2ee74d608eb19e8b203;hb=390b7c4110bc0fc9b76d6342f288d44d58fc27b9;hpb=34ff0e502e68116f02fab290d8c87cfb89bc5d32
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index da6a125..797a509 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -3604,7 +3604,10 @@ kind for the type variable cxt.
GHC now instead allows you to specify the kind of a type variable directly, wherever
-a type variable is explicitly bound. Namely:
+a type variable is explicitly bound, with the flag .
+
+
+This flag enables kind signatures in the following places:
data declarations:
@@ -5306,6 +5309,87 @@ Assertion failures can be caught, see the documentation for the
unrecognised word is (silently)
ignored.
+ Certain pragmas are file-header pragmas. A file-header
+ pragma must precede the module keyword in the file.
+ There can be as many file-header pragmas as you please, and they can be
+ preceded or followed by comments.
+
+
+ LANGUAGE pragma
+
+ LANGUAGEpragma
+ pragmaLANGUAGE
+
+ The LANGUAGE pragma allows language extensions to be enabled
+ in a portable way.
+ It is the intention that all Haskell compilers support the
+ LANGUAGE pragma with the same syntax, although not
+ all extensions are supported by all compilers, of
+ course. The LANGUAGE pragma should be used instead
+ of OPTIONS_GHC, if possible.
+
+ For example, to enable the FFI and preprocessing with CPP:
+
+{-# LANGUAGE ForeignFunctionInterface, CPP #-}
+
+ LANGUAGE is a file-header pragma (see ).
+
+ Every language extension can also be turned into a command-line flag
+ by prefixing it with "-X"; for example .
+ (Similarly, all "-X" flags can be written as LANGUAGE pragmas.
+
+
+ A list of all supported language extensions can be obtained by invoking
+ ghc --supported-languages (see ).
+
+ Any extension from the Extension type defined in
+ Language.Haskell.Extension
+ may be used. GHC will report an error if any of the requested extensions are not supported.
+
+
+
+
+ OPTIONS_GHC pragma
+ OPTIONS_GHC
+
+ pragmaOPTIONS_GHC
+
+
+ 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.
+
+
+ OPTIONS_GHC is a file-header pragma (see ).
+
+
+ INCLUDE pragma
+
+ The INCLUDE pragma is for specifying the names
+ of C header files that should be #include'd into
+ the C source code generated by the compiler for the current module (if
+ compiling via C). For example:
+
+
+{-# INCLUDE "foo.h" #-}
+{-# INCLUDE <stdio.h> #-}
+
+ INCLUDE is a file-header pragma (see ).
+
+ An INCLUDE pragma is the preferred alternative
+ to the option (), because the
+ INCLUDE pragma is understood by other
+ compilers. Yet another alternative is to add the include file to each
+ foreign import declaration in your code, but we
+ don't recommend using this approach with GHC.
+
+
DEPRECATED pragmaDEPRECATED
@@ -5358,31 +5442,6 @@ Assertion failures can be caught, see the documentation for the
.
-
- INCLUDE pragma
-
- The INCLUDE pragma is for specifying the names
- of C header files that should be #include'd into
- the C source code generated by the compiler for the current module (if
- compiling via C). For example:
-
-
-{-# INCLUDE "foo.h" #-}
-{-# INCLUDE <stdio.h> #-}
-
- The INCLUDE pragma(s) must appear at the top of
- your source file with any OPTIONS_GHC
- pragma(s).
-
- An INCLUDE pragma is the preferred alternative
- to the option (), because the
- INCLUDE pragma is understood by other
- compilers. Yet another alternative is to add the include file to each
- foreign import declaration in your code, but we
- don't recommend using this approach with GHC.
-
-
INLINE and NOINLINE pragmas
@@ -5529,29 +5588,6 @@ happen.
-
- LANGUAGE pragma
-
- LANGUAGEpragma
- pragmaLANGUAGE
-
- This allows language extensions to be enabled in a portable way.
- It is the intention that all Haskell compilers support the
- LANGUAGE pragma with the same syntax, although not
- all extensions are supported by all compilers, of
- course. The LANGUAGE pragma should be used instead
- of OPTIONS_GHC, if possible.
-
- For example, to enable the FFI and preprocessing with CPP:
-
-{-# LANGUAGE ForeignFunctionInterface, CPP #-}
-
- Any extension from the Extension type defined in
- Language.Haskell.Extension may be used. GHC will report an error if any of the requested extensions are not supported.
-
-
-
LINE pragma
@@ -5571,22 +5607,6 @@ happen.
pragma.
-
- OPTIONS_GHC pragma
- OPTIONS_GHC
-
- pragmaOPTIONS_GHC
-
-
- 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.
-
-
RULES pragma