Dead code detection

Simon Peyton-Jones
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.


| -----Original Message-----
| From: Pertti Kellom=E4ki []=20
| Sent: 18 July 2001 11:43
| To:
| Subject: Dead code detection
| 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.
| Thanks,
| --=20
| pertti
| _______________________________________________
| Haskell mailing list