From b896489a1c548680f75e9001fb4bd0b30dbfedb3 Mon Sep 17 00:00:00 2001 From: Daniel Fischer Date: Mon, 30 May 2011 08:37:25 +0200 Subject: [PATCH] using.xml whitespace --- docs/users_guide/using.xml | 118 ++++++++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index df01521..96d3c73 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -78,7 +78,7 @@ Hello World! Options overview - + GHC's behaviour is controlled by options, which for historical reasons are also sometimes referred to as command-line flags or arguments. @@ -86,11 +86,11 @@ Hello World! Command-line arguments - + structure, command-line command-linearguments argumentscommand-line - + An invocation of GHC takes the following form: @@ -112,7 +112,7 @@ ghc [argument...] Command line options in source files - + source-file options Sometimes it is useful to make the connection between a @@ -130,7 +130,7 @@ ghc [argument...] module X where ... - + OPTIONS_GHC is a file-header pragma (see ). @@ -163,7 +163,7 @@ module X where for more details. - + Static, Dynamic, and Mode options staticoptions @@ -204,14 +204,14 @@ module X where - + The flag reference tables () lists the status of each flag. There are a few flags that are static except that they can also be used with GHCi's :set command; these are listed as “static/:set” in the - table. + table. @@ -266,7 +266,7 @@ module X where compiler. - + .ll @@ -336,7 +336,7 @@ module X where more detail in . - + ghc ––make @@ -375,7 +375,7 @@ module X where more details. - + @@ -531,7 +531,7 @@ module X where Using <command>ghc</command> <option>––make</option> separate compilation - + In this mode, GHC will build a multi-module Haskell program by following dependencies from one or more root modules (usually just Main). For example, if your @@ -583,7 +583,7 @@ ghc Main.hs source. - + Any of the command-line options described in the rest of this chapter can be used with , but note that any options @@ -596,7 +596,7 @@ ghc Main.hs (say, some auxiliary C code), then the object files can be given on the command line and GHC will include them when linking the executable. - + Note that GHC can only follow dependencies if it has the source file available, so if your program includes a module for which there is no source file, even if you have an object and an @@ -609,7 +609,7 @@ ghc Main.hs to add directories to the search path (see ). - + Expression evaluation mode @@ -633,7 +633,7 @@ ghc -e expr ghc -e Main.main Main.hs - + or we can just use this mode to evaluate expressions in the context of the Prelude: @@ -646,22 +646,22 @@ olleh Batch compiler mode - + In batch mode, GHC will compile one or more source files given on the command line. - + The first phase to run is determined by each input-file suffix, and the last phase is determined by a flag. If no relevant flag is present, then go all the way through to linking. This table summarises: - + - + Phase of the compilation system @@ -677,7 +677,7 @@ olleh - .hs - + C pre-processor (opt.) .hs (with @@ -685,28 +685,28 @@ olleh .hspp - + Haskell compiler .hs , .hc, .s - + C compiler (opt.) .hc or .c .s - + assembler .s .o - + linker other @@ -716,17 +716,17 @@ olleh - + - + Thus, a common invocation would be: ghc -c Foo.hs - + to compile the Haskell source file Foo.hs to an object file Foo.o. @@ -741,7 +741,7 @@ ghc -c Foo.hs flag turns it on. See for more details. - + Note: The option -E option runs just the pre-processing passes of the compiler, dumping the result in a file. @@ -800,7 +800,7 @@ ghc -c Foo.hs verify. - + n @@ -812,7 +812,7 @@ ghc -c Foo.hs argument. Specifying on its own is equivalent to , and the other levels have the following meanings: - + @@ -862,7 +862,7 @@ ghc -c Foo.hs - + @@ -1000,7 +1000,7 @@ ghc -c Foo.hs : - Makes any warning into a fatal error. Useful so that you don't + Makes any warning into a fatal error. Useful so that you don't miss warnings when doing batch compilation. @@ -1205,18 +1205,18 @@ foreign import "&f" f :: FunPtr t - , + , : - + incomplete patterns, warning patterns, incomplete - The option warns + The option warns about places where - a pattern-match might fail at runtime. + a pattern-match might fail at runtime. The function g below will fail when applied to non-empty lists, so the compiler will emit a warning about @@ -1228,7 +1228,7 @@ g [] = 2 This option isn't enabled by default because it can be a bit noisy, and it doesn't always indicate a bug in the program. However, it's generally considered good practice - to cover all the cases in your functions, and it is switched + to cover all the cases in your functions, and it is switched on by . The flag is @@ -1296,9 +1296,9 @@ f foo = foo { x = 6 } - This flag warns if you use an unqualified + This flag warns if you use an unqualified import declaration - that does not explicitly list the entities brought into scope. For + that does not explicitly list the entities brought into scope. For example @@ -1339,7 +1339,7 @@ module M where complexFn :: a -> a -> String complexFn x y = ... _simpleFn ... - The idea is that: (a) users of the class will only call complexFn; + The idea is that: (a) users of the class will only call complexFn; never _simpleFn; and (b) instance declarations can define either complexFn or _simpleFn. @@ -1379,7 +1379,7 @@ module M where shadowing, warning - + This option causes a warning to be emitted whenever an inner-scope value has the same name as an outer-scope value, i.e. the inner value shadows the outer one. This can catch @@ -1400,8 +1400,8 @@ module M where orphan instances, warning orphan rules, warning - - This option causes a warning to be emitted whenever the + + This option causes a warning to be emitted whenever the module contains an "orphan" instance declaration or rewrite rule. An instance declaration is an orphan if it appears in a module in which neither the class nor the type being instanced are declared @@ -1410,7 +1410,7 @@ module M where orphans is called an orphan module. The trouble with orphans is that GHC must pro-actively read the interface files for all orphan modules, just in case their instances or rules - play a role, whether or not the module's interface would otherwise + play a role, whether or not the module's interface would otherwise be of any use. See for details. @@ -1498,8 +1498,8 @@ f "2" = 2 which are unused. For top-level functions, the warning is only given if the binding is not exported. A definition is regarded as "used" if (a) it is exported, or (b) it is - mentioned in the right hand side of another definition that is used, or (c) the - function it defines begins with an underscore. The last case provides a + mentioned in the right hand side of another definition that is used, or (c) the + function it defines begins with an underscore. The last case provides a way to suppress unused-binding warnings selectively. Notice that a variable is reported as unused even if it appears in the right-hand side of another @@ -1858,7 +1858,7 @@ f "2" = 2 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. + runs the risk of reducing sharing. @@ -1922,7 +1922,7 @@ f "2" = 2 unfolding, controlling - (Default: 45) Governs the maximum size that GHC will + (Default: 45) Governs the maximum size that GHC will allow a function unfolding to be. (An unfolding has a “size” that reflects the cost in terms of “code bloat” of expanding that unfolding at @@ -1959,10 +1959,10 @@ f "2" = 2 - + - - &phases; + + &phases; &shared_libs; @@ -2022,7 +2022,7 @@ f "2" = 2 use GHC to compile and run parallel programs, in we describe the language features that affect parallelism. - + Compile-time options for SMP parallelism @@ -2030,7 +2030,7 @@ f "2" = 2 linked with the option (see ). Additionally, the following compiler options affect parallelism: - + @@ -2087,7 +2087,7 @@ f "2" = 2 results you find.. For example, on a dual-core machine we would probably use +RTS -N2 -RTS. - + Omitting x, i.e. +RTS -N -RTS, lets the runtime choose the value of x itself @@ -2149,7 +2149,7 @@ f "2" = 2 - + Hints for using SMP parallelism @@ -2216,14 +2216,14 @@ f "2" = 2 intermediate code generation - GHC can dump its optimized intermediate code (said to be in “Core” format) + GHC can dump its optimized intermediate code (said to be in “Core” format) 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, + An External Representation for the GHC Core Language, and sample tools for manipulating Core files (in Haskell) are available in the extcore package on Hackage. Note that the format of .hcr - files is different from the Core output format that GHC generates + 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 -- 1.7.10.4