X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fusing.xml;h=21e5205022150da4510fe55f7e1cebd245941906;hb=9d03becc597e5b1ab6c8466209a1263bf8ba6f29;hp=9df6eb50b694e60ff27cc97be8210fcdf27ef0f6;hpb=e11fa7a5e0025460df3b8562ccbf3ffd1db68d5d;p=ghc-hetmet.git diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index 9df6eb5..21e5205 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -73,10 +73,9 @@ module X where maintains internally, so you'll be desperately disappointed if you try to glob etc. inside OPTIONS_GHC. - NOTE: the contents of OPTIONS_GHC are prepended to the - command-line options, so you do have the - ability to override OPTIONS_GHC settings via the command - line. + NOTE: the contents of OPTIONS_GHC are appended to the + command-line options, so options given in the source file + override those given on the command-line. It is not recommended to move all the contents of your Makefiles into your source files, but in some circumstances, the @@ -343,6 +342,20 @@ module X where + ghc --show-iface file + + + + + Read the interface in + file and dump it as text to + stdout. For example ghc --show-iface M.hi. + + + + + + ghc --supported-languages @@ -409,20 +422,6 @@ module X where - - - - ghc --print-docdir - - - - - Print the path to GHC's documentation directory. Note that - some distributions do no include the documentation, in which case - this directory may be empty or may not exist. - - - @@ -639,7 +638,7 @@ ghc -c Foo.hs Overriding the default behaviour for a file As described above, the way in which a file is processed by GHC - depends on its suffix. This behaviour can be overriden using the + depends on its suffix. This behaviour can be overridden using the option: @@ -898,6 +897,16 @@ ghc -c Foo.hs + + : + + + Warnings are treated only as warnings, not as errors. This is + the default, but can be useful to negate a + flag. + + + The full set of warning options is described below. To turn @@ -1121,7 +1130,7 @@ f foo = foo { x = 6 } This option causes a warning to be emitted whenever the module contains an "orphan" instance declaration or rewrite rule. - An instance declartion is an orphan if it appears in a module in + An instance declaration is an orphan if it appears in a module in which neither the class nor the type being instanced are declared in the same module. A rule is an orphan if it is a rule for a function declared in another module. A module containing any @@ -1513,15 +1522,31 @@ f "2" = 2 - - + + - Turn off the "state hack" whereby any lambda with a - State# token as argument is considered to be - single-entry, hence it is considered OK to inline things inside - it. This can improve performance of IO and ST monad code, but it - runs the risk of reducing sharing. + Turn on call-pattern specialisation. + + + + + + + + + + Turn on the liberate-case transformation. + + + + + + + + + + Turn on the static argument transformation. @@ -1593,24 +1618,6 @@ f "2" = 2 - - - - - Switches on an experimental "optimisation". - Switching it on makes the compiler a little keener to - inline a function that returns a constructor, if the - context is that of a thunk. - - x = plusInt a b - - If we inlined plusInt we might get an opportunity to use - update-in-place for the thunk 'x'. - - - - - : inlining, controlling @@ -1713,7 +1720,7 @@ f "2" = 2 is also possible to obtain performance improvements with parallelism on programs that do not use concurrency. This section describes how to use GHC to compile and run parallel programs, in we desribe the language features that affect + linkend="lang-parallel" /> we describe the language features that affect parallelism. @@ -1815,16 +1822,15 @@ statements or clauses. intermediate code generation GHC can dump its optimized intermediate code (said to be in “Core” format) - to a file as a side-effect of compilation. Core files, which are given the suffix - .hcr, can be read and processed by non-GHC back-end - tools. The Core format is formally described in + to a file as a side-effect of compilation. Non-GHC back-end tools can read and process Core files; these files have the suffix + .hcr. The Core format is described in An External Representation for the GHC Core Language, - and sample tools (in Haskell) - for manipulating Core files are available in the GHC source distribution - directory /fptools/ghc/utils/ext-core. + and sample tools + for manipulating Core files (in Haskell) are in the GHC source distribution + directory under utils/ext-core. Note that the format of .hcr - files is different (though similar) to the Core output format generated - for debugging purposes (). + files is different from the Core output format that GHC generates + for debugging purposes (), though the two formats appear somewhat similar. The Core format natively supports notes which you can add to your source code using the CORE pragma (see -GHC can also read in External Core files as source; just give the .hcr file on -the command line, instead of the .hs or .lhs Haskell source. -A current infelicity is that you need to give the -fglasgow-exts flag too, because -ordinary Haskell 98, when translated to External Core, uses things like rank-2 types. +Currently (as of version 6.8.2), GHC does not have the ability to read in External Core files as source. If you would like GHC to have this ability, please make your wishes known to the GHC Team. + &debug;