Great library, but I didn't manage to mix the use of subliner with other deriving libraries.
#!/usr/bin/env ocaml
#use "topfind"
#require "ppx_subliner"
#require "ppx_deriving.show"
type conf = {
username : string; [@default "pad"]
debug : bool; [@defaul false]
command : string; [@pos 0] [@doc "CMD"]
}
[@@deriving subliner, show]
let run (conf : conf) =
Printf.printf "Hello %s\n" conf.command
let () =
let info = Cmdliner.Cmd.info Sys.argv.(0) in
let term = Cmdliner.Term.(const run $ conf_cmdliner_term ()) in
let cmd = Cmdliner.Cmd.v info term in
exit (Cmdliner.Cmd.eval cmd)
File "/tmp/test.ml", line 12, characters 12-20:
12 | [@@deriving subliner, show]
^^^^^^^^
Error: Cannot locate deriver subliner
If I remove the use of ppx_deriving.show then it works fine.
Looks like we can't have both at the same time. This was working though with ppx_deriving.cmdliner