learn-ocaml icon indicating copy to clipboard operation
learn-ocaml copied to clipboard

Selectively enable OCaml warnings

Open fpottier opened this issue 6 years ago • 2 comments
trafficstars

It would be nice if we could selectively enable certain OCaml warnings (e.g., the unused-value warning) when compiling our code (solution/prelude/prepare/test).

fpottier avatar Dec 27 '18 17:12 fpottier

Doesn't the [@@@warning "-32"] attribute work for this purpose ?

AltGr avatar Jan 22 '19 13:01 AltGr

Good suggestion (thanks!) but no, the attribute appears to be ignored. (I have placed [@@@ocaml.warning "+A"] at the very beginning of test.ml.) I don't know why -- perhaps because this is OCaml 4.05?

fpottier avatar Jan 22 '19 15:01 fpottier