[project @ 1998-04-30 20:52:26 by sof]
[ghc-hetmet.git] / ghc / docs / users_guide / using.vsgml
index 25acde6..e6f6e9b 100644 (file)
@@ -228,7 +228,7 @@ If you would like to look at the assembler output, toss in a
 <nidx>standard error, saving</nidx>
 
 Sometimes, you may cause GHC to be rather chatty on standard error;
-with @-fshow-import-specs@, for example.  You can instruct GHC to
+with @-dshow-rn-trace@, for example.  You can instruct GHC to
 <em>append</em> this output to a particular log file with a @-odump
 <blah>@<nidx>-odump &lt;blah&gt; option</nidx> option.
 
@@ -265,7 +265,7 @@ GHC has a number of options that select which types of non-fatal error
 messages, otherwise known as warnings, can be generated during
 compilation.  By default, you get a standard set of warnings which are
 generally likely to indicate bugs in your program.  These are:
-@-fwarn-overlpapping-patterns@, @-fwarn-duplicate-exports@, and
+@-fwarn-overlapping-patterns@, @-fwarn-duplicate-exports@, and
 @-fwarn-missing-methods@.  The following flags are simple ways to
 select standard ``packages'' of warnings:
 
@@ -313,6 +313,16 @@ into hard-to-find bugs, e.g., in the inadvertent cyclic definition
 Consequently, this option does <em>not</em> allow cyclic recursive
 definitions.
 
+<tag>@-fwarn-hi-shadowing@:</tag> 
+<nidx>-fwarn-hi-shadowing option</nidx>
+<nidx>interface files, shadowing</nidx>
+
+Warns you about shadowing of interface files along the supplied import path.
+For instance, assuming you invoke @ghc@ with the import path
+@-iutils:src@ and @Utils.hi@ exist in both the @utils@ and @src@
+directories, @-fwarn-hi-shadowing@ will warn you that @utils/Utils.hi@
+shadows @src/Utils.hi@.
+
 <tag>@-fwarn-overlapping-patterns@:</tag>
 <nidx>-fwarn-overlapping-patterns option</nidx>
 <nidx>overlapping patterns, warning</nidx>
@@ -672,19 +682,22 @@ a rule to do so; one of the preceding suffix rules does the job
 nicely.
 
 Putting inter-dependencies of the form @Foo.o : Bar.hi@ into your
-@Makefile@ by hand is rather error-prone.  Don't worry---never fear,
-@mkdependHS@ is here! (and is distributed as part of GHC) Add the
-following to your @Makefile@:
+@Makefile@ by hand is rather error-prone.  @ghc@ offers you a helping
+hand with it's @-M@ option. To automatically generate
+inter-dependencies, add the following to your @Makefile@:
 
 <tscreen><verb>
 depend :
-        mkdependHS -- $(HC_OPTS) -- $(SRCS)
+        $(HC) -M $(HC_OPTS) $(SRCS)
 </verb></tscreen>
 
 Now, before you start compiling, and any time you change the @imports@
 in your program, do @make depend@ before you do @make cool_pgm@.
-@mkdependHS@ will append the needed dependencies to your @Makefile@.
-@mkdependHS@ is fully describe in Section <ref name="Makefile
+@ghc -M@ will then append the needed dependencies to your @Makefile@.
+
+The dependencies are actually generated by another utility,
+@mkdependHS@, which @ghc -M@ just calls upon. @mkdependHS@ is
+distributed with GHC and is documented in Section <ref name="Makefile
 dependencies in Haskell: using mkdependHS" id="mkdependHS">.
 
 A few caveats about this simple scheme: