8000 GitHub - giltho/ppx_subliner: [@@ deriving] plugin to generate Cmdliner sub-command groups, and ppx rewriter to generate Cmdliner evaluations. · GitHub
[go: up one dir, main page]

Skip to content

About

[@@ deriving] plugin to generate Cmdliner sub-command groups, and ppx rewriter to generate Cmdliner evaluations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

[@@deriving subliner] and [%%subliner]

OCaml CI GitHub release status Coverage Status

[@@deriving] plugin to generate Cmdliner sub-command groups, and ppx rewriter to generate Cmdliner evaluations.

Installation

ppx_subliner can be installed via OCaml Package Manager.

$ opam install ppx_subliner

Usage

Please see the documentation.

Example

type foo = { my_arg : string } [@@deriving subliner]

type params = Foo of foo | Bar | Foobar of { my_arg : string }
[@@deriving subliner]

let handle = function
  | Foo { my_arg } -> print_endline ("Foo " ^ my_arg)
  | Bar -> print_endline "Bar"
  | Foobar { my_arg } -> print_endline ("Foobar" ^ my_arg)

[%%subliner.cmds
eval.params <- handle]
(** Some docs *)

About

[@@ deriving] plugin to generate Cmdliner sub-command groups, and ppx rewriter to generate Cmdliner evaluations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0