diff options
author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2019-10-16 17:30:02 +0200 |
---|---|---|
committer | Gabriel Scherer <gabriel.scherer@gmail.com> | 2019-10-16 18:25:54 +0200 |
commit | 92a260fdf694342a816cb195ecf491aa7952b8e7 (patch) | |
tree | 7b9c34d38967072e913644b0eae23350e79150c2 /man | |
parent | fd568688d753d66da58747d80ef71ce06ecc52df (diff) | |
download | ocaml-92a260fdf694342a816cb195ecf491aa7952b8e7.tar.gz |
disable warning 30 (same constructor/label used in two mutually-recursive decls)
Warning 30 warns when the same constructor/label is used in two
mutually-recursive type declarations. This warning (added in OCaml
3.12, 2010) was meaningful at the time where constructor/label
conflicts had a shadowing semantics: the "last" definition would mean,
while ideally mutually-recursive definitions should not be strictly
ordered but defined "all at once".
Since OCaml 4.01 (2013) we support type-based disambiguation of
constructor/label names and it is now common to write code such as,
say
type pattern = Var of var | ...
type expr = Var of var | ...
(no warning, of course). But warning 30 fires if you instead write
type pattern = Var of var | ...
and expr = Var of var | ...
This doesn't make much sense, and in particular it certainly makes no
sense to enable this warning by default. The present PR disables it by
default.
Diffstat (limited to 'man')
-rw-r--r-- | man/ocamlc.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/man/ocamlc.m b/man/ocamlc.m index 3fdaf6f1cb..6b8530095a 100644 --- a/man/ocamlc.m +++ b/man/ocamlc.m @@ -1018,7 +1018,7 @@ mentioned here corresponds to the empty set. .IP The default setting is -.BR \-w\ +a\-4\-6\-7\-9\-27\-29\-32..42\-44\-45\-48\-50\-60\-66 . +.BR \-w\ +a\-4\-6\-7\-9\-27\-29\-30\-32..42\-44\-45\-48\-50\-60\-66 . Note that warnings .BR 5 \ and \ 10 are not always triggered, depending on the internals of the type checker. |