package liquidsoap-lang

  1. Overview
  2. Docs

Main script evaluation

exception Error
type stdlib = {
  1. full_term : Term.t;
  2. checked_term : Term.t;
  3. env : Typing.env;
}
type append_stdlib = unit -> stdlib
val type_term : ?name:string -> ?stdlib:append_stdlib -> ?term:Term.t -> ?ty:Type.t -> ?cache_dirtype:Cache.dirtype -> cache:bool -> trim:bool -> lib:bool -> Parsed_term.t -> Term.t

Typecheck a term and return it. Might return a cached value!

val eval_term : ?name:string -> toplevel:bool -> Term.t -> Value.t

Evaluate a term.

val strict : bool ref

Raise errors for warnings.

val libs : ?stdlib:string -> ?error_on_no_stdlib:bool -> ?deprecated:bool -> unit -> string list

Return the list of external libraries.

val load_libs : ?stdlib:string -> unit -> unit

Load the external libraries.

val throw : ?formatter:Format.formatter -> ?lexbuf:Sedlexing.lexbuf -> unit -> exn -> unit
val interactive : unit -> unit

Interactive loop: read from command line, eval, print and loop.

val parse : string -> Parsed_term.t * Term.t

Parse a string.

val error_header : formatter:Format.formatter -> int -> Pos.Option.t -> unit
val report : ?lexbuf:Sedlexing.lexbuf -> ?default:(unit -> 'a) -> (throw:(exn -> unit) -> unit -> 'a) -> 'a

Report language errors.

OCaml

Innovation. Community. Security.