X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fusing.xml;h=34f769a2ffddeb527200ec8c22abda4aabb37561;hb=650d644055ff9cf23891611efb578e4fff07a1d9;hp=9d7875aca279f2e1c85f4d1cadd6b41c97b83279;hpb=0729e745e2f13888f9ccc76c10546a52e953fa6f;p=ghc-hetmet.git diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index 9d7875a..34f769a 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -990,9 +990,11 @@ ghc -c Foo.hs not enabled by are , + , , , - , and + , + , . @@ -1175,6 +1177,21 @@ foreign import "&f" f :: FunPtr t + : + + + Causes the compiler to emit a warning when a Prelude numeric + conversion converts a type T to the same type T; such calls + are probably no-ops and can be omitted. The functions checked for + are: toInteger, + toRational, + fromIntegral, + and realToFrac. + + + + + : @@ -1200,26 +1217,41 @@ foreign import "&f" f :: FunPtr t - : + , + : + + incomplete patterns, warning patterns, incomplete - Similarly for incomplete patterns, the function + The option warns + about places where + 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 this when is - enabled. - + enabled. g [] = 2 - - This option isn't enabled by default because it can be + 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. + to cover all the cases in your functions, and it is switched + on by . + + The flag is + similar, except that it + applies only to lambda-expressions and pattern bindings, constructs + that only allow a single pattern: + +h = \[] -> 2 +Just k = f y + + @@ -1631,31 +1663,6 @@ f "2" = 2 . - - - - : - -Ofile <file> option - optimising, customised - - - (NOTE: not supported since GHC 4.x. Please ask if - you're interested in this.) - - For those who need absolute - control over exactly what options are - used (e.g., compiler writers, sometimes :-), a list of - options can be put in a file and then slurped in with - . - - In that file, comments are of the - #-to-end-of-line variety; blank - lines and most whitespace is ignored. - - Please ask if you are baffled and would like an - example of ! - - We don't use a flag for day-to-day @@ -2105,25 +2112,6 @@ f "2" = 2 - - - RTS - option - - Migrate a thread to the current CPU when it is woken - up. Normally when a thread is woken up after being - blocked it will be scheduled on the CPU it was running on - last; this option allows the thread to immediately migrate - to the CPU that unblocked it. - - The rationale for allowing this eager migration is - that it tends to move threads that are communicating with - each other onto the same CPU; however there are - pathalogical situations where it turns out to be a poor - strategy. Depending on the communication pattern in your - program, it may or may not be a good idea. - - @@ -2219,9 +2207,8 @@ statements or clauses. .hcr. The Core format is described in An External Representation for the GHC Core Language, 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 + 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 for debugging purposes (), though the two formats appear somewhat similar.