package libsail

  1. Overview
  2. Docs

Module Libsail.InteractiveSource

Sourceval opt_interactive : bool ref
Sourcemodule State : sig ... end

Each interactive command is passed this struct, containing the abstract syntax tree, effect info and the type-checking environment. Also contains the default Sail directory and configuration.

Sourceval arg : string -> string
Sourceval command : string -> string
Sourcetype action =
  1. | ArgString of string * string -> action
  2. | ArgInt of string * int -> action
  3. | Action of string option * (Sail_file.position * string * State.istate) -> State.istate option
Sourceval unit_action : (unit -> unit) -> action
Sourcemodule Arg : sig ... end
Sourceval (let@) : ('a, 'b) Arg.t -> ('a -> 'b) -> action
Sourceval get_command : string -> (string * action) option
Sourceval all_commands : unit -> (string * (string * string option * action)) list
Sourceval generate_help : string -> string -> action -> string * string * string
Sourceval run_action : State.istate -> string -> Sail_file.position -> string -> action -> State.istate
Sourceval register_command : name:string -> ?shortname:string -> help:string -> action -> unit

This is the main function used to register new interactive commands.