package libsail

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Libsail.InteractiveSource

Sourceval opt_interactive : bool ref
Sourcetype istate = {
  1. ast : Type_check.tannot Ast_defs.ast;
  2. effect_info : Effects.side_effect_info;
  3. env : Type_check.Env.t;
  4. default_sail_dir : string;
  5. config : Yojson.Basic.t option;
}

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

Sourceval initial_istate : Yojson.Basic.t option -> string -> istate
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 istate -> istate
  4. | ActionUnit of istate -> unit
Sourceval reflect_typ : action -> Ast.typ
Sourceval get_command : string -> (string * action) option
Sourceval all_commands : unit -> (string * (string * action)) list
Sourceval generate_help : string -> string -> action -> string
Sourceval run_action : istate -> string -> string -> action -> istate
Sourceval register_command : name:string -> help:string -> action -> unit

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