How are ListLabels, ArrayLabels, etc. implemented?

Thanks! Interesting technique, which I can reproduce by compiling manually.

I’d be interested to hear how one could make this work with a dune workflow.

Ideally, something like this would work without any configuration (assume I have the mli files properly written):

(* my_labeled_module.ml *)
[@@@warning "-6"]

include My_normal_module

But it doesn’t. “labels-omitted” warning number 6 seems to be an error.

I tried to turn the error into a warning with a config:

$ tail -n+1 dune-workspace 
(lang dune 3.11)

(context default)

(env
 (dev
  (flags :standard -warn-error -6)))

But that doesn’t work. I can turn other errors into warnings with this dune specific technique, but not this one. It seems that labels-omitted is an error now, not a warning.