X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fusing.xml;h=8b08d9d5266107bdcd0686705d76f5f9e578aee9;hb=9be618cdf99b04ce7eef6eeabc168b59174bb843;hp=a80e8d12769665fa7ab68eddd44f9f8fea2e0a01;hpb=6dceb65b092ba63975c93dc8b15442deb32e6e22;p=ghc-hetmet.git
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index a80e8d1..8b08d9d 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, warningpatterns, 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
+
+
@@ -1284,6 +1300,39 @@ f foo = foo { x = 6 }
+
+ :
+
+ missing import lists, warning
+ import lists, missing
+
+
+
+ This flag warns if you use an unqualified
+ import declaration
+ that does not explicitly list the entities brought into scope. For
+ example
+
+
+module M where
+ import X( f )
+ import Y
+ import qualified Z
+ p x = f x x
+
+
+ The flag will warn about the import
+ of Y but not X
+ If module Y is later changed to export (say) f,
+ then the reference to f in M will become
+ ambiguous. No warning is produced for the import of Z
+ because extending Z's exports would be unlikely to produce
+ ambiguity in M.
+
+
+
+
+ :
@@ -1652,7 +1701,7 @@ f "2" = 2
We don't use a flag for day-to-day
work. We use to get respectable speed;
e.g., when we want to measure something. When we want to go for
- broke, we tend to use (and we go for
+ broke, we tend to use (and we go for
lots of coffee breaks).The easiest way to see what (etc.)
@@ -2096,25 +2145,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.
-
-
@@ -2173,27 +2203,6 @@ f "2" = 2
-
- :
-
- (x86 only)-monly-N-regs
- option (iX86 only) GHC tries to
- “steal” four registers from GCC, for performance
- reasons; it almost always works. However, when GCC is
- compiling some modules with four stolen registers, it will
- crash, probably saying:
-
-
-Foo.hc:533: fixed or forbidden register was spilled.
-This may be due to a compiler bug or to impossible asm
-statements or clauses.
-
-
- Just give some registers back with
- . Try `3' first, then `2'.
- If `2' doesn't work, please report the bug to us.
-
-