Add -ddump-mod-cycles to -M behaviour
authorsimonpj@microsoft.com <unknown>
Thu, 22 Mar 2007 12:28:59 +0000 (12:28 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 22 Mar 2007 12:28:59 +0000 (12:28 +0000)
commita896a832ab7306da8c638df7f44619b3548bd518
tree832bb0cc8fc7d09b3036846899bb29881fa7239d
parent985916e235d53246d5a00b91349803f563377904
Add -ddump-mod-cycles to -M behaviour

This patch adds a flag -ddump-mod-cycles to the "ghc -M" dependency analyser.

The effect of
ghc -M -ddump-mod-cycles
is to dump a list of cycles foud in the module graph.  The display is
trimmed so that only dependencies within the cycle are shown; and the
list of modules in a cycle is itself sorted into dependency order, so that
it is easy to track the chain of dependencies.

Open question: should the flag be "-ddump-mod-cycles" or "-optdep-dump-mod-cycles"?  For this reason I have not yet added to the documentation.
compiler/main/DriverMkDepend.hs
compiler/main/DynFlags.hs