You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@tmcgilchrist reported how the API triggers unerasable-optional-argument errors/warnings in OCaml 4.12.0
here #2 (comment)
File "src/qCSTM.ml", line 94, characters 25-35:
15
94 | let consistency_test ?(count=1000) ~name =
16
^^^^^^^^^^
17
Error (warning 16 [unerasable-optional-argument]): this optional argument cannot be erased.
18
File "src/qCSTM.ml", line 120, characters 19-29:
19
120 | let agree_test ?(count=1000) ~name =
20
^^^^^^^^^^
21
Error (warning 16 [unerasable-optional-argument]): this optional argument cannot be erased.
One potential fix is to swap both count and name to both be labelled arguments (#2 (review)):
Edit: as for the unerasable-optional-argument and OCaml 4.12, I think the API should just make count labelled like name, but that change is probably also best handled separately...
@tmcgilchrist suggests another option of letting the functions take a unit as the last parameter (#2 (comment)):
@tmcgilchrist reported how the API triggers
unerasable-optional-argument
errors/warnings in OCaml 4.12.0here #2 (comment)
One potential fix is to swap both
count
andname
to both be labelled arguments (#2 (review)):@tmcgilchrist suggests another option of letting the functions take a unit as the last parameter (#2 (comment)):
I suppose a third option is to disable the error/warning (
-w -16
?)... 😅The text was updated successfully, but these errors were encountered: