package libsail

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val opt_interactive : bool Stdlib.ref
module 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

val arg : string -> string
val command : string -> string
type action =
  1. | ArgString of string * string -> action
  2. | ArgInt of string * int -> action
  3. | Action of State.istate -> State.istate
  4. | ActionUnit of State.istate -> unit
val reflect_typ : action -> Ast.typ
val get_command : string -> (string * action) option
val all_commands : unit -> (string * (string * action)) list
val generate_help : string -> string -> action -> string
val run_action : State.istate -> string -> string -> action -> State.istate
val register_command : name:string -> help:string -> action -> unit

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

OCaml

Innovation. Community. Security.