Liquidsoap_lang.Lang_coreinclude module type of struct include Value endtype env = (string * Value.t) listWe derive a hash of the environment to invalidate the cache when the builtin env change. We mostly keep name and methods.
val hash_fold_env :
Liquidsoap_lang.Term_hash.Ppx_hash_lib.Std.Hash.state ->
env ->
Liquidsoap_lang.Term_hash.Ppx_hash_lib.Std.Hash.stateval hash_fold_dynamic_methods :
dynamic_methods Liquidsoap_lang.Term_hash.Ppx_hash_lib.Std.Hash.folderval hash_fold_t :
Value.t Liquidsoap_lang.Term_hash.Ppx_hash_lib.Std.Hash.folderval hash_env :
env ->
Liquidsoap_lang.Term_hash.Ppx_hash_lib.Std.Hash.hash_valueval hash_dynamic_methods :
dynamic_methods ->
Liquidsoap_lang.Term_hash.Ppx_hash_lib.Std.Hash.hash_valueval hash :
Value.t ->
Liquidsoap_lang.Term_hash.Ppx_hash_lib.Std.Hash.hash_valuetype in_value = [ | `Int of int| `Float of float| `String of string| `Bool of bool| `Null| `Custom of Liquidsoap_lang.Term.Custom.t| `List of Value.t list| `Tuple of Value.t list| `Fun of fun_v| `FFI of ffi ]val methods : Value.t -> Value.t Runtime_term.Methods.tval map_methods :
Value.t ->
(Value.t Runtime_term.Methods.t -> Value.t Runtime_term.Methods.t) ->
Value.tval set_pos : Value.t -> Pos.Option.t -> Value.tval has_flag : Value.t -> Flags.flag -> boolval add_flag : Value.t -> Flags.flag -> unitval is_unit : Value.t -> boolval make :
?pos:Pos.Option.base ->
?methods:Value.t Runtime_term.Methods.t ->
?flags:Flags.flags ->
in_value ->
Value.tval string_of_int_value : flags:Flags.flags -> int -> stringPerform a sequence of invokes: invokes x l1;l2;l3;... is x.l1.l2.l3...
module type Custom = Value.Custommodule type CustomDef = Value.CustomDefmodule MkCustomFromTerm = Value.MkCustomFromTermmodule MkCustom = Value.MkCustommodule RuntimeType = Value.RuntimeTypemodule Custom = Liquidsoap_lang.Term.Custommodule Methods = Term.Methodstype t = Type.ttype scheme = Type.schemetype value = Value.tType construction
val int_t : Type.tval unit_t : Type.tval float_t : Type.tval bool_t : Type.tval string_t : Type.tval method_t : Type.t -> (string * Type.scheme * string) list -> Type.tval optional_method_t :
Type.t ->
(string * Type.scheme * string) list ->
Type.tval fun_t : Type.t Type_base.argument list -> Type.t -> Type.tval univ_t : ?constraints:Type.constr list -> unit -> Type.tValue construction
val mk :
?pos:Pos.Option.base ->
?methods:Value.t Liquidsoap_lang.Value.Methods.t ->
?flags:Flags.flags ->
Value.in_value ->
Value.tval unit : Value.tval int : int -> Value.tval octal_int : int -> Value.tval hex_int : int -> Value.tval bool : bool -> Value.tval float : float -> Value.tval string : string -> Value.tval null : Value.tHelpers for defining builtin functions.
val add_builtin :
category:Doc.Value.category ->
descr:string ->
?flags:Doc.Value.flag list ->
?meth:Value.t meth list ->
?examples:string list ->
?base:string ->
string ->
(string * Type_base.t * Value.t option * string option) list ->
Type.t ->
(env -> Value.t) ->
stringval add_builtin_value :
category:Doc.Value.category ->
descr:string ->
?flags:Doc.Value.flag list ->
?base:string ->
string ->
Value.t ->
Type.t ->
stringval add_builtin_base :
category:Doc.Value.category ->
descr:string ->
?flags:Doc.Value.flag list ->
?base:string ->
string ->
in_value ->
Type.t ->
stringval to_unit : Value.t -> unitval to_bool : Value.t -> boolval to_bool_getter : Value.t -> unit -> boolval to_string : Value.t -> stringval to_string_getter : Value.t -> unit -> stringval to_float : Value.t -> floatval to_float_getter : Value.t -> unit -> floatval to_int : Value.t -> intval to_int_getter : Value.t -> unit -> intval to_num : Value.t -> [> `Float of float | `Int of int ]val to_string_list : Value.t -> string listval to_int_list : Value.t -> int listassoc lbl n l returns the nth element in l of which the first component is lbl.
val raise_error :
?bt:Stdlib.Printexc.raw_backtrace ->
?message:string ->
pos:Pos.t list ->
string ->
'aval runtime_error_of_exception :
bt:Stdlib.Printexc.raw_backtrace ->
kind:string ->
exn ->
Runtime_error.runtime_errormodule Position : sig ... endmodule Stacktrace : sig ... end