Closed ineol closed 4 months ago
Oh! What a silly bug!
Thanks a lot for the fix.
There is also this option, printing the values as you suggest. It also avoids the dummy auto
argument.
let backends = [ ("Coq", Limits.Coq); ("Mp", Limits.Mp) ] in
let docv = Cmdliner.Arg.doc_alts_enum ~quoted:true backends in
Arg.(
value
& opt (some (enum backends)) None
& info [ "int_backend" ] ~docv ~doc)
This version prints
--int_backend=BACKEND (absent='Mp' for OCaml 4.x, 'Coq' for OCaml 5.x)
Select Interruption Backend, if absent, the best available for
your OCaml version will be selected. BACKEND is either 'Mp', for
memprof-limits token-based interruption, or 'Coq', for Coq's
polling mode (unreliable). The 'Mp' backend is only supported in
OCaml 4.x series.
which seems clear
Currently,
coq-lsp --help
crashed becauseCmdliner
cannot print the default option for--int-backend
It would be nicer to have
help
print the possible values of the enum, but I couldn't figure out how.