package functoria-runtime

  1. Overview
  2. Docs
On This Page
  1. Runtime keys
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Functoria_runtime.KeySource

Key defines values that can be set by runtime command-line arguments. This module is the runtime companion of Key.

Runtime keys

Sourcetype 'a t

The type for runtime keys containing a value of type 'a.

Sourceval create : 'a Arg.t -> 'a t

create conv create a new runtime key.

Sourceval get : 'a t -> 'a

get k is the value of the key k. Use the default value if no command-line argument is provided.

Sourceval default : 'a t -> 'a option

default k is the default value of k, if one is available. This function can be called before cmdliner's evaluation.

Sourceval term : 'a t -> unit Cmdliner.Term.t

term k is the Cmdliner term whose evaluation sets ks' value to the parsed command-line argument.