X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fusing.xml;h=cc4f36639ab38703ee51cd63de82a463bb0ead98;hb=79d7a7c0d17b51dfb2bb06d758b6e556550862ba;hp=2ddc60bdb8b5a457ae9fccdafba04036f8e3120a;hpb=092d79172d9e27e329481aae18b4a931619ab81c;p=ghc-hetmet.git diff --git a/ghc/docs/users_guide/using.xml b/ghc/docs/users_guide/using.xml index 2ddc60b..cc4f366 100644 --- a/ghc/docs/users_guide/using.xml +++ b/ghc/docs/users_guide/using.xml @@ -333,7 +333,7 @@ ghc ––make Main.hs GHC doesn't have to be restarted for each compilation, which means it can cache information between compilations. - Compiling a muli-module program with ghc + Compiling a multi-module program with ghc ––make can be up to twice as fast as running ghc individually on each source file. @@ -358,7 +358,7 @@ ghc ––make Main.hs pragma (see ). If the program needs to be linked with additional objects - (say, some auxilliary C code), then the object files can be + (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. @@ -660,6 +660,39 @@ ghc -c Foo.hs + + + + + + + Causes GHC to emit the full source span of the + syntactic entity relating to an error message. Normally, GHC + emits the source location of the start of the syntactic + entity only. + + For example: + +test.hs:3:6: parse error on input `where' + + becomes: + +test296.hs:3:6-10: parse error on input `where' + + And multi-line spans are possible too: + +test.hs:(5,4)-(6,7): + Conflicting definitions for `a' + Bound at: test.hs:5:4 + test.hs:6:7 + In the binding group for: a, b, a + + Note that line numbers start counting at one, but + column numbers start at zero. This choice was made to + follow existing convention (i.e. this is how Emacs does + it). + + @@ -802,6 +835,33 @@ g [] = 2 + : + + + incomplete record updates, warning + record updates, incomplete + + The function + f below will fail when applied to + Bar, so the compiler will emit a warning about + this when is + enabled. + + +data Foo = Foo { x :: Int } + | Bar + +f :: Foo -> Foo +f foo = foo { x = 6 } + + + This option isn't enabled be default because it can be + very noisy, and it often doesn't indicate a bug in the + program. + + + + : @@ -1710,7 +1770,7 @@ and maintaining internal tables of global addresses. only) Means to pass the like-named option to GCC; it says to use the Version 8 SPARC instructions, notably integer multiply and divide. The - similiar GCC options for SPARC also + similar GCC options for SPARC also work, actually. @@ -1779,7 +1839,7 @@ statements or clauses. 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 teh -fglasgow-exts flag too, because +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.