package omod

  1. Overview
  2. Docs

Module Private.TopSource

Abstracts away the OCaml Toploop API.

Toplevel directives

Sourceval add_inc : string -> (unit, string) result

add_inc dir adds dir to the include path.

Sourceval rem_inc : string -> (unit, string) result

rem_inc dir removes dir from the include path.

Sourceval load_ml : string -> (unit, string) result

load_ml ml loads the source file ml.

Sourceval load_obj : string -> (unit, string) result

load_obj obj loads the object file obj.

Sourceval is_nat : unit -> bool

is_nat () is true if the current toplevel implementation is ocamlnat.

Topdirs implementations

Sourcemodule type TOPDIRS = sig ... end

The type for Topdir module implementations.

Sourceval set_topdirs : is_nat:bool -> (module TOPDIRS) -> unit

set_topdirs ~is_nat t sets the topdirs implementation to t and indicates with is_nat if this ocamlnat's implementation.