Module Types

Types for the TINT evaluator.

Syntax

module Syntax : sig ... end

Syntax of TINT expressions.

type error = string * string * string list

The type of TINT runtime errors.

type forms = {form}7 Stdlib__Map.Make(Prelude.String).t

The type of the TINT forms store.

type state = {
  1. syntax : Syntax.t;
  2. prims : prims;
  3. forms : forms;
  4. active : char Prelude.Stack.t;
  5. neutral : {ncomp}2 Prelude.Stack.t;
  6. trace : bool;
  7. implicit : bool;
  8. warning : bool;
  9. meta : char;
  10. tty : Stdlib.in_channel option;
  11. exiting : int option;
  12. inchans : Stdlib.in_channel Stdlib__Map.Make(Prelude.String).t;
  13. outchans : Stdlib.out_channel Stdlib__Map.Make(Prelude.String).t;
  14. ln : int;
}

The type of TINT runtime state.

The interpreter refers to the command-line TINT interpreter, tint(1).

and return = (state * string, error) Stdlib.result

The type of a TINT primitive's return value.

and prim = state -> string list -> return

The type of a TINT primitive.

and prims = prim Stdlib__Map.Make(Prelude.String).t

The type of the TINT primitives store.

val inchans : Stdlib.in_channel Stdlib__Map.Make(Prelude.String).t

The default collection of opened in_channel's (just stdin).

val outchans : Stdlib.out_channel Stdlib__Map.Make(Prelude.String).t

The default collection of opened out_channel's (just stdout and stderr).

val state : ?syntax:Syntax.t -> ?prims:prim Stdlib__Map.Make(Prelude.String).t -> ?forms:{form}7 Stdlib__Map.Make(Prelude.String).t -> ?active:char Prelude.Stack.t -> ?neutral:{ncomp}2 Prelude.Stack.t -> ?trace:bool -> ?implicit:bool -> ?warning:bool -> unit -> state

(state ()) returns a fresh TINT runtime state.

The optional parameters allow you override the default values of any of the fields.

val string_of_form : ?brief:bool -> {form}7 -> string
val string_of_forms : ?brief:bool -> {form}7 Stdlib__Map.Make(Prelude.String).t -> string
val string_of_ncomp : {ncomp}2 -> string
val string_of_active : char Prelude.Stack.t -> string
val string_of_neutral : Syntax.t -> {ncomp}2 Prelude.Stack.t -> string
val string_of_state : state -> string
val form : string -> {form}7

(form str) is the form containing str.