Module Imandra_interactive.REPL_state

val init : linenoise:bool -> unit -> unit

Initialize

val add_to_history : unit -> unit

Add last input to history, if enabled

val save_history : unit -> unit

Save history to file, if enabled

val ibuf : Imandra_syntax.Input_buf.t

Main input buffer

val reset_last_readline_entry : unit -> unit
val last_readline_entry : cleanup:bool -> unit -> string
exception E_wrap of exn * Imandra_util.Iloc.Input.t * Imandra_util.Iloc.t list

Wrap exceptions that contain a location

val read_phrase : Imandra_surface.Code_fragment.syntax -> Parsetree.toplevel_phrase list * Imandra_util.Iloc.Input.t

Read a list of toplevel phrases (as small as possible).

  • raises E_wrap

    if the parser raises an exception.

val get_line : prompt:string -> unit -> string option