X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fusing.xml;h=34f769a2ffddeb527200ec8c22abda4aabb37561;hb=e2f84335da9ff9e91951f935c92ea444a13125de;hp=a80e8d12769665fa7ab68eddd44f9f8fea2e0a01;hpb=6dceb65b092ba63975c93dc8b15442deb32e6e22;p=ghc-hetmet.git diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index a80e8d1..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 + , + , . @@ -1215,27 +1217,41 @@ foreign import "&f" f :: FunPtr t - : + , + : + + incomplete patterns, warning patterns, incomplete - Similarly for incomplete patterns, the functions - g and h below will fail when applied to + 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 -h = \[] -> 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 + + @@ -2096,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. - -