package mirage

  1. Overview
  2. Docs

Define runtime command-line arguments.

type 'a arg

The type for command-line arguments that reads a value of type 'a.

val create : pos:(string * int * int * int) -> ?name:string -> ?packages:Package.t list -> string -> 'a arg
type t

The type command-line arguments where the type of the value is abstract.

val packages : t -> Package.t list
val v : 'a arg -> t

v k is the k with its type hidden.

module Set : sig ... end

Set implements sets over t elements.

Code Serialization

val call : t Fmt.t

call fmt k outputs name () to fmt, where n is k's OCaml name.

val serialize : runtime_modname:string -> t Fmt.t

serialize ctx ppf k outputs the Cmdliner runes to parse command-line arguments represented by k at runtime.

val var_name : t -> string
OCaml

Innovation. Community. Security.