<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 <blah> option</nidx> option.
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:
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>
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: