GHC has a warning for never used imports; such imports are just redundant and cause unexpected name space contamination. The warning is useful to keep up your import list minimal as possible.
open has the same issue of the name space contamination, and unnecessary opens should be warned, too. And I have added a new warning for it.
You can obtain the latest diff for OCaml 3.12.1 from my repo at https://bitbucket.org/camlspotter/mutated_ocaml . After cloning, get it by:
hg diff -r ocaml-3.12.1-11110 -r redundant_open_warningAfter patching, building is as usual:
make core coreboot world opt opt.opt install # Beware what you are doing!I have found nearly 150 redundant opens in OCaml source code! You should check your OCaml code with it, too!
P.S. The first patch contained some garbages. Now the above command creates a clean patch for OCaml 3.12.1.