package liquidsoap-lang

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

Module Liquidsoap_lang.Lang_coreSource

include module type of struct include Value end
Sourceand env = (string * Value.t) list
Sourceand lazy_env = (string * Value.t Lazy.t) list
Sourceand in_value = Value.in_value =
  1. | Ground of Term.Ground.t
  2. | List of Value.t list
  3. | Tuple of Value.t list
  4. | Null
  5. | Fun of (string * string * Value.t option) list * lazy_env * Term.t
  6. | FFI of (string * string * Value.t option) list * env -> Value.t
Sourceval string_of_float : float -> string
Sourceval invoke : Value.t -> string -> Value.t

Find a method in a value.

Sourceval invokes : Value.t -> string list -> Value.t

Perform a sequence of invokes: invokes x l1;l2;l3;... is x.l1.l2.l3...

Sourceval demeth : Value.t -> Value.t
Sourceval remeth : Value.t -> Value.t -> Value.t
Sourceval split_meths : Value.t -> (string * Value.t) list * Value.t
Sourceval compare : Value.t -> Value.t -> int
Sourcemodule type Abstract = Value.Abstract
Sourcemodule type AbstractDef = Value.AbstractDef
Sourcemodule MkAbstractFromTerm = Value.MkAbstractFromTerm
Sourcemodule MkAbstract = Value.MkAbstract
Sourcemodule RuntimeType = Value.RuntimeType
Sourcemodule Ground = Term.Ground
Sourcemodule Methods = Term.Methods
Sourcetype t = Type.t
Sourcetype module_name = string
Sourcetype scheme = Type.scheme
Sourcetype value = Value.t = {
  1. pos : Pos.Option.t;
  2. value : in_value;
  3. methods : value Methods.t;
}

Type construction

Sourceval int_t : Type.t
Sourceval unit_t : Type.t
Sourceval float_t : Type.t
Sourceval bool_t : Type.t
Sourceval string_t : Type.t
Sourceval tuple_t : Type.t list -> Type.t
Sourceval product_t : Type.t -> Type.t -> Type.t
Sourceval record_t : (string * Type.t) list -> Type.t
Sourceval optional_record_t : (string * Type.t) list -> Type.t
Sourceval method_t : Type.t -> (string * Type.scheme * string) list -> Type.t
Sourceval optional_method_t : Type.t -> (string * Type.scheme * string) list -> Type.t
Sourceval of_tuple_t : Type.t -> Type.t list
Sourceval of_product_t : Type.t -> Type.t * Type.t
Sourceval fun_t : (bool * string * Type.t) list -> Type.t -> Type.t
Sourceval list_t : Type.t -> Type.t
Sourceval of_list_t : Type.t -> Type.t
Sourceval nullable_t : Type.t -> Type.t
Sourceval univ_t : ?constraints:Type.constr list -> unit -> Type.t
Sourceval getter_t : Type.t -> Type.t
Sourceval ref_t : Type.t -> Type.t

Value construction

Sourceval mk : ?pos:Pos.t -> in_value -> value
Sourceval unit : value
Sourceval int : int -> value
Sourceval bool : bool -> value
Sourceval float : float -> value
Sourceval string : string -> value
Sourceval tuple : Value.t list -> value
Sourceval product : Value.t -> Value.t -> value
Sourceval list : Value.t list -> value
Sourceval null : value
Sourceval meth : value -> (string * value) list -> value
Sourceval record : (string * value) list -> value
Sourceval val_fun : (string * string * Value.t option) list -> (env -> Value.t) -> value
Sourceval term_fun : (string * string * Value.t option) list -> Term.t -> value
Sourceval val_cst_fun : (string * Value.t option) list -> value -> value
Sourceval reference : (unit -> Value.t) -> (Value.t -> 'a) -> value

Helpers for defining builtin functions.

Sourcetype proto = (string * t * value option * string option) list
Sourceval builtin_type : (string * Type.t * 'a option * 'b) list -> Type.t -> Type.t
Sourceval meth_fun : value -> (string * value) list -> value
Sourceval mk_module_name : ?base:string -> string -> string
Sourceval add_builtin : category:Doc.Value.category -> descr:string -> ?flags:Doc.Value.flag list -> ?meth:(string * Type.scheme * string * value) list -> ?examples:string list -> ?base:string -> string -> (string * Type_base.t * Value.t option * string option) list -> Type.t -> (env -> Value.t) -> string
Sourceval add_builtin_value : category:Doc.Value.category -> descr:string -> ?flags:Doc.Value.flag list -> ?base:string -> string -> Value.t -> Type.t -> string
Sourceval add_builtin_base : category:Doc.Value.category -> descr:string -> ?flags:Doc.Value.flag list -> ?base:string -> string -> in_value -> Type.t -> string
Sourceval add_module : ?base:string -> string -> string
Sourceval module_name : 'a -> 'a
Sourceval apply_fun : (?pos:Pos.t -> value -> env -> value) ref
Sourceval apply : value -> env -> Value.t

High-level manipulation of values

Sourceval to_unit : value -> unit
Sourceval to_bool : value -> bool
Sourceval to_bool_getter : value -> unit -> bool
Sourceval to_fun : value -> env -> Value.t
Sourceval to_string : value -> string
Sourceval to_string_getter : value -> unit -> string
Sourceval to_float : value -> float
Sourceval to_float_getter : value -> unit -> float
Sourceval to_int : value -> int
Sourceval to_int_getter : value -> unit -> int
Sourceval to_num : value -> [> `Float of float | `Int of int ]
Sourceval to_list : value -> Value.t list
Sourceval to_tuple : value -> Value.t list
Sourceval to_option : value -> value option
Sourceval to_valued_option : (value -> 'a) -> value -> 'a option
Sourceval to_default_option : default:'a -> (value -> 'a) -> value -> 'a
Sourceval to_product : value -> Value.t * Value.t
Sourceval to_string_list : value -> string list
Sourceval to_int_list : value -> int list
Sourceval to_getter : value -> unit -> Value.t
Sourceval to_ref : Value.t -> (unit -> Value.t) * (Value.t -> unit)
Sourceval to_valued_ref : (Value.t -> 'a) -> ('b -> Value.t) -> Value.t -> (unit -> 'a) * ('b -> unit)
Sourceval assoc : 'a -> int -> ('a * 'b) list -> 'b

assoc lbl n l returns the nth element in l * of which the first component is lbl.

Sourceval raise_error : ?bt:Printexc.raw_backtrace -> ?message:string -> pos:Pos.t list -> string -> 'a
Sourceval runtime_error_of_exception : bt:Printexc.raw_backtrace -> kind:string -> exn -> Runtime_error.runtime_error
Sourceval raise_as_runtime : bt:Printexc.raw_backtrace -> kind:string -> exn -> 'a
Sourceval environment : unit -> (string * string) list
Sourcemodule Single_position : sig ... end
Sourcemodule Position : sig ... end
Sourcemodule Stacktrace : sig ... end
Sourceval pos_var : string
Sourceval pos : (string * value) list -> (Lexing.position * Lexing.position) list
OCaml

Innovation. Community. Security.