The compiler seems to emit irrelevant warnings 33 (disabled by default).
module M = struct type t = A | B end let () = match M.B with M.(A|B) -> ()
$ ocamlc -w +a tmp.ml File "tmp.ml", line 5, characters 24-31: Warning 33: unused open M. File "tmp.ml", line 5, characters 24-31: Warning 33: unused open M.
If you remove the local open, ocamlc will warn you that the constructors have been selected from
M but that you should do an open, basically.
I was able to confirm this on 4.04 and 4.08 and have not found a discussion of it. Is it worth opening a bug report?