Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Unused modules are not reported #7124
Original bug ID: 7124
There is a bunch of warning to report unused top level declarations, but they don't work on whole modules, for example:
compiled with -w +a, no warning is reported. If the first line is replaced with "open Format" or "module F = struct let x = 2 end", then warnings are reported.
This is the case in 4.02.3 and trunk. I'm not sure if it's a bug or a missing feature.
Comment author: @alainfrisch
Very quick implementation of this:
Needs some testing and cleanup, and perhaps improved support for recursive modules.