I’m happy to annouce that Weeder 2.6.0 has been released. Weeder is a Haskell utility to help find unused Haskell declarations over an entire project. As always, you can install Weeder from either Github or Hackage. The changes in this release are:
Added
Weeder now supports GHC 9.6.
Changed
Weeder now uses TOML as a configuration format. Please see Weeder’s README for more information on the configuration format.
Weeder now sorts weeds in a single file by ascending line number
Fixed
Weeder now internally adds declarations once. This shouldn’t result in any user visible changes, but may improve performance.
Also, in the next week or two we plan to release Weeder 2.7, which will support detecting unused type classes and type class instances. We’d love additional testing, so if you’re interested please try this branch.
Since it’s quite a big change, it would have been nice if the release notes mentioned the motivation for the switch of configuration formats. Anyway, it seems it’s down to the dependency footprint. Seems reasonable, I guess.
Yes, partly the dependency footprint, partly an easier path to get us to GHC 9.6, but also partly because Dhall was overkill for what Weeder needs (and is more novel than TOML). I understand it’s a fairly major breaking change, but my hope is that it doesn’t cause too much friction.
Can weeder help find local function which exported but shouldn’t ?
I discovered that not exporting everything in a module can help reduce compilation time.
(Modifying a local function might not trigger full recompilation if the function using it are not inlined ).
Thus exporting only the minimum for each module could be really useful.
I saw that there is a Haskell Summer of Code project titled “Teaching Weeder about Type Class Instances”. Is that work still underway? Is the MR 10701 for GHC part of that?
Also, in the next week or two we plan to release Weeder 2.7, which will support detecting unused type classes and type class instances. We’d love additional testing, so if you’re interested please try this branch.