Dead code detection

Simon Peyton-Jones simonpj@microsoft.com
Wed, 18 Jul 2001 01:04:38 -0700


GHC will report unused bindings (-fwarn-unused-binds)
but only within a module.  If it's exported, GHC doesn't help you.

I'm sure GHC itself has plenty of dead code that only a global analysis
can spot!

GHC's interface file for a module reports all the imported things that
the module
depends on. So the raw material for a global analyser is in place.

Simon


| -----Original Message-----
| From: Pertti Kellom=E4ki [mailto:pk@cs.tut.fi]=20
| Sent: 18 July 2001 11:43
| To: haskell@haskell.org
| Subject: Dead code detection
|=20
|=20
| I am working with a fairly rapidly changing code base,
| with another person besides me making changes. Can any of
| the Haskell compilers warn about unused function definitions,=20
| or does a similar standalone tool exist? I am fairly sure the=20
| code base includes redundant definitions that just clutter up=20
| the source, and I would like to be able to detect them easily.
|=20
| Thanks,
| --=20
| pertti
|=20
| _______________________________________________
| Haskell mailing list
| Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
|=20