Hello I'm looking for some tools to help maintain a largish Haskell program. Some of the things I'd like tool support for are: - detection of dead code; - detection of unnecessary arguments for functions; - detection of unnecesary imports of modules; - a graphical representation of dependencies between modules. Any pointers would be much appreciated. Gavin -- Gavin Lowe Oxford University Computing Laboratory, Parks Road, Oxford, OX1 3QD. Phone: +44 1865 273841. Fax: +44 1865 273839. E-mail: gavin.lowe@comlab.ox.ac.uk The secret of all discoverers is that they regard nothing as impossible
Gavin Lowe <gavin.lowe@comlab.ox.ac.uk> asked for:
- a graphical representation of dependencies between modules.
HsDep available from http://www.cas.mcmaster.ca/~kahl/Haskell/ uses dot from AT&T's graphviz suite. You can of course tune with the generated dot file manually and run dot again to tune the result. Wolfram
- detection of unnecessary arguments for functions; - detection of unnecesary imports of modules;
http://www.haskell.org/ghc/docs/latest/html/users_guide/options-sanity.html ghc -W: Provides the standard warnings plus -fwarn-incomplete-patterns, -fwarn-unused-matches, -fwarn-unused-imports, -fwarn-misc, and -fwarn-unused-binds. -- -- Johannes Waldmann, Tel/Fax: (0341) 3076 6479 / 6480 -- ------ http://www.imn.htwk-leipzig.de/~waldmann/ ---------
- detection of unnecessary arguments for functions; - detection of unnecesary imports of modules;
http://www.haskell.org/ghc/docs/latest/html/users_guide/options-sanity.html
ghc -W:
Provides the standard warnings plus -fwarn-incomplete-patterns, -fwarn-unused-matches, -fwarn-unused-imports, -fwarn-misc, and -fwarn-unused-binds.
These also give you lots of dead code detection (unused-binds, unused-matches), but may miss some dead code. Also very useful for getting specific with your import lists is -ddump-minimal-imports. Cheers, Andy
participants (4)
-
Andy Moran -
Gavin Lowe -
Johannes Waldmann -
kahl@cas.mcmaster.ca