[project @ 2000-07-20 10:50:47 by rrt]
[ghc-hetmet.git] / ghc / docs / users_guide / gone_wrong.sgml
index 094125c..11cb66a 100644 (file)
@@ -20,7 +20,7 @@ be of interest.)
 </Para>
 
 <Sect1 id="wrong-compiler">
-<Title>When the compiler ``does the wrong thing''
+<Title>When the compiler &ldquo;does the wrong thing&rdquo;
 </Title>
 
 <Para>
@@ -32,7 +32,7 @@ be of interest.)
 <VariableList>
 
 <VarListEntry>
-<Term>``Help! The compiler crashed (or `panic'd)!''</Term>
+<Term>&ldquo;Help! The compiler crashed (or `panic'd)!&rdquo;</Term>
 <ListItem>
 <Para>
 These events are <Emphasis>always</Emphasis> bugs in the GHC system&mdash;please report them.
@@ -40,7 +40,7 @@ These events are <Emphasis>always</Emphasis> bugs in the GHC system&mdash;please
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``The compiler ran out of heap (or stack) when compiling itself!''</Term>
+<Term>&ldquo;The compiler ran out of heap (or stack) when compiling itself!&rdquo;</Term>
 <ListItem>
 <Para>
 It happens.  We try to supply reasonable <Option>-H&lt;n&gt;</Option> flags for
@@ -61,15 +61,15 @@ heap.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``The compiler died with a pattern-matching error.''</Term>
+<Term>&ldquo;The compiler died with a pattern-matching error.&rdquo;</Term>
 <ListItem>
 <Para>
-This is a bug just as surely as a ``panic.'' Please report it.
+This is a bug just as surely as a &ldquo;panic.&rdquo; Please report it.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``This is a terrible error message.''</Term>
+<Term>&ldquo;This is a terrible error message.&rdquo;</Term>
 <ListItem>
 <Para>
 If you think that GHC could have produced a better error message,
@@ -78,7 +78,7 @@ please report it as a bug.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``What about these `trace' messages from GHC?''</Term>
+<Term>&ldquo;What about these `trace' messages from GHC?&rdquo;</Term>
 <ListItem>
 <Para>
 Almost surely not a problem.  About some specific cases&hellip;
@@ -96,7 +96,7 @@ turning on the <Option>-fshow-simplifier-progress</Option>
 </Para>
 
 <Para>
-If the simplifier definitely seems to be ``looping,'' please report
+If the simplifier definitely seems to be &ldquo;looping,&rdquo; please report
 it.
 </Para>
 </ListItem>
@@ -106,10 +106,10 @@ it.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``What about this warning from the C compiler?''</Term>
+<Term>&ldquo;What about this warning from the C compiler?&rdquo;</Term>
 <ListItem>
 <Para>
-For example: ``&hellip;warning: `Foo' declared `static' but never defined.''
+For example: &ldquo;&hellip;warning: `Foo' declared `static' but never defined.&rdquo;
 Unsightly, but shouldn't be a problem.
 </Para>
 </ListItem>
@@ -132,11 +132,11 @@ running programs compiled using unstable interfaces.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``I think GHC is producing incorrect code'':</Term>
+<Term>&ldquo;I think GHC is producing incorrect code&rdquo;:</Term>
 <ListItem>
 <Para>
 Unlikely :-) A useful be-more-paranoid option to give to GHC is
-<Option>-dcore-lint</Option><IndexTerm><Primary>-dcore-lint option</Primary></IndexTerm>; this causes a ``lint''
+<Option>-dcore-lint</Option><IndexTerm><Primary>-dcore-lint option</Primary></IndexTerm>; this causes a &ldquo;lint&rdquo;
 pass to check for errors (notably type errors) after each Core-to-Core
 transformation pass.  We run with <Option>-dcore-lint</Option> on all the time; it
 costs about 5&percnt; in compile time.
@@ -144,7 +144,7 @@ costs about 5&percnt; in compile time.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``Why did I get a link error?''</Term>
+<Term>&ldquo;Why did I get a link error?&rdquo;</Term>
 <ListItem>
 <Para>
 If the linker complains about not finding <Literal>&lowbar;&lt;something&gt;&lowbar;fast</Literal>, then
@@ -154,7 +154,7 @@ proper dependency order.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``What's a `consistency error'?''</Term>
+<Term>&ldquo;What's a `consistency error'?&rdquo;</Term>
 <ListItem>
 <Para>
 (These are reported just after linking your program.)
@@ -176,11 +176,11 @@ tags/strings in your object files.  They must all be the same!
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``Is this line number right?''</Term>
+<Term>&ldquo;Is this line number right?&rdquo;</Term>
 <ListItem>
 <Para>
 On this score, GHC usually does pretty well, especially
-if you ``allow'' it to be off by one or two.  In the case of an
+if you &ldquo;allow&rdquo; it to be off by one or two.  In the case of an
 instance or class declaration, the line number
 may only point you to the declaration, not to a specific method.
 </Para>
@@ -196,7 +196,7 @@ Please report line-number errors that you find particularly unhelpful.
 </Sect1>
 
 <Sect1 id="wrong-compilee">
-<Title>When your program ``does the wrong thing''
+<Title>When your program &ldquo;does the wrong thing&rdquo;
 </Title>
 
 <Para>
@@ -212,7 +212,7 @@ please see <XRef LinkEnd="sooner-faster-quicker">).
 <VariableList>
 
 <VarListEntry>
-<Term>``Help! My program crashed!''</Term>
+<Term>&ldquo;Help! My program crashed!&rdquo;</Term>
 <ListItem>
 <Para>
 (e.g., a `segmentation fault' or `core dumped')
@@ -220,18 +220,19 @@ please see <XRef LinkEnd="sooner-faster-quicker">).
 </Para>
 
 <Para>
-If your program has no <Function>&lowbar;ccall&lowbar;</Function>s/<Function>&lowbar;casm&lowbar;</Function>s in it, then a crash is
-always a BUG in the GHC system, except in one case: If your program is
-made of several modules, each module must have been compiled after any
-modules on which it depends (unless you use <Filename>.hi-boot</Filename> files, in which
-case these <Emphasis>must</Emphasis> be correct with respect to the module source). 
+If your program has no foreign calls in it, then a crash is always a BUG in
+the GHC system, except in one case: If your program is made of several
+modules, each module must have been compiled after any modules on which it
+depends (unless you use <Filename>.hi-boot</Filename> files, in which case
+these <Emphasis>must</Emphasis> be correct with respect to the module
+source).
 </Para>
 
 <Para>
 For example, if an interface is lying about the type of an imported
 value then GHC may well generate duff code for the importing module.
 <Emphasis>This applies to pragmas inside interfaces too!</Emphasis>  If the pragma is
-lying (e.g., about the ``arity'' of a value), then duff code may result.
+lying (e.g., about the &ldquo;arity&rdquo; of a value), then duff code may result.
 Furthermore, arities may change even if types do not.
 </Para>
 
@@ -247,9 +248,10 @@ changed interface file, before and after, when applicable.
 </Para>
 
 <Para>
-If you are using <Command>make</Command>, a useful tool to make sure that every module
-<Emphasis>is</Emphasis> up-to-date with respect to its imported interfaces is
-<Command>mkdependHS</Command> (which comes with GHC).  Please see <XRef LinkEnd="mkdependHS">.
+If you are using <Command>make</Command>, GHC can automatically
+generate the dependencies required in order to make sure that every
+module <Emphasis>is</Emphasis> up-to-date with respect to its imported
+interfaces.  Please see <XRef LinkEnd="sec-makefile-dependencies">.
 </Para>
 
 <Para>
@@ -270,7 +272,7 @@ So, before you report a bug because of a core dump, you should probably:
 </Para>
 
 <Para>
-Of course, if you have <Function>&lowbar;ccall&lowbar;</Function>s/<Function>&lowbar;casm&lowbar;</Function>s in your program then all
+Of course, if you have foreign calls in your program then all
 bets are off, because you can trash the heap, the stack, or whatever.
 </Para>
 
@@ -281,7 +283,7 @@ GHC-compiled program, please see <XRef LinkEnd="hard-core-debug">.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``My program entered an `absent' argument.''</Term>
+<Term>&ldquo;My program entered an `absent' argument.&rdquo;</Term>
 <ListItem>
 <Para>
 This is definitely caused by a bug in GHC. Please report it.
@@ -289,7 +291,7 @@ This is definitely caused by a bug in GHC. Please report it.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term>``What's with this `arithmetic (or `floating') exception' ''?</Term>
+<Term>&ldquo;What's with this `arithmetic (or `floating') exception' &rdquo;?</Term>
 <ListItem>
 <Para>
 <Literal>Int</Literal>, <Literal>Float</Literal>, and <Literal>Double</Literal> arithmetic is <Emphasis>unchecked</Emphasis>.
@@ -315,14 +317,15 @@ exception (please report it if it does).
 
 <Para>
 Glasgow Haskell is a changing system so there are sure to be bugs in
-it.  Please report them to <Email>glasgow-haskell-bugs@haskell.org</Email>!  (However, please
+it.  Please report them to
+<Email>glasgow-haskell-bugs@haskell.org</Email>!  (However, please
 check the earlier part of this section to be sure it's not a known
 not-really-a problem.)
 </Para>
 
 <Para>
 The name of the bug-reporting game is: facts, facts, facts.
-Don't omit them because ``Oh, they won't be interested&hellip;''
+Don't omit them because &ldquo;Oh, they won't be interested&hellip;&rdquo;
 </Para>
 
 <Para>
@@ -331,9 +334,9 @@ Don't omit them because ``Oh, they won't be interested&hellip;''
 <ListItem>
 
 <Para>
- What kind of machine are you running on, and exactly what
-version of the operating system are you using? (<Command>uname -a</Command> or <Command>cat
-/etc/motd</Command> will show the desired information.)
+What kind of machine are you running on, and exactly what version of
+the operating system are you using? (<Command>uname -a</Command> or
+<Command>cat /etc/motd</Command> will show the desired information.)
 
 </Para>
 </ListItem>
@@ -348,7 +351,7 @@ version of the operating system are you using? (<Command>uname -a</Command> or <
 
 <Para>
  Run the sequence of compiles/runs that caused the offending
-behaviour, capturing all the input/output in a ``script'' (a UNIX
+behaviour, capturing all the input/output in a &ldquo;script&rdquo; (a UNIX
 command) or in an Emacs shell window.  We'd prefer to see the whole
 thing.
 
@@ -373,8 +376,8 @@ have, etc.
 <ListItem>
 
 <Para>
- If practical, please send enough source files/interface files
-for us to duplicate the problem.
+ If practical, please send enough source files for us to duplicate the
+ problem.
 
 </Para>
 </ListItem>
@@ -434,9 +437,9 @@ it <Emphasis>probably is</Emphasis> a GC bug.
 <ListItem>
 
 <Para>
-If it crashes with the normal
-collector, but not when you force two-space collection (<Option>-F2s</Option>
-runtime flag), then it <Emphasis>probably is</Emphasis> a GC bug.
+If it crashes with the normal collector, but not when you force
+two-space collection (<Option>-G1</Option> runtime flag), then it
+<Emphasis>probably is</Emphasis> a GC bug.
 </Para>
 </ListItem>
 
@@ -445,9 +448,9 @@ runtime flag), then it <Emphasis>probably is</Emphasis> a GC bug.
 </Para>
 
 <Para>
-If it <Emphasis>is</Emphasis> a GC bug, you may be able to avoid it by using a
-particular heap size or by using a <Option>-F2s</Option> runtime flag.  (But don't
-forget to report the bug!!!)
+If it <Emphasis>is</Emphasis> a GC bug, you may be able to avoid it by
+using a particular heap size or by using a <Option>-G1</Option>
+runtime flag.  (But don't forget to report the bug!!!)
 </Para>
 
 <Para>
@@ -457,3 +460,10 @@ ToDo: more here?
 </Sect1>
 
 </Chapter>
+
+<!-- Emacs stuff:
+     ;;; Local Variables: ***
+     ;;; mode: sgml ***
+     ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter") ***
+     ;;; End: ***
+ -->