package liquidsoap-lang

  1. Overview
  2. Docs
val debug : bool ref
val debug_levels : bool ref
val debug_variance : bool ref

Types

type variance = [
  1. | `Covariant
  2. | `Invariant
]
type t = Type_base.t = {
  1. pos : Pos.Option.t;
  2. descr : Type_base.descr;
}
type custom = Type_base.custom
type custom_handler = Type_base.custom_handler = {
  1. typ : custom;
  2. custom_name : string;
  3. copy_with : (t -> t) -> custom -> custom;
  4. occur_check : (t -> unit) -> custom -> unit;
  5. filter_vars : (Type_base.var list -> t -> Type_base.var list) -> Type_base.var list -> custom -> Type_base.var list;
  6. repr : (Type_base.var list -> t -> Type_base.constr Type_base.R.t) -> Type_base.var list -> custom -> Type_base.constr Type_base.R.t;
  7. subtype : (t -> t -> unit) -> custom -> custom -> unit;
  8. sup : (t -> t -> t) -> custom -> custom -> custom;
  9. to_string : custom -> string;
}
type invar = Type_base.invar =
  1. | Free of Type_base.var
type var_t = Type_base.var_t = {
  1. id : int;
  2. mutable contents : invar;
}
type descr = Type_base.descr =
  1. | String
  2. | Int
  3. | Float
  4. | Bool
  5. | Never
  6. | Custom of custom_handler
  7. | Constr of Type_base.constructed
  8. | Getter of t
    (*

    a getter: something that is either a t or () -> t

    *)
  9. | List of Type_base.repr_t
  10. | Tuple of t list
  11. | Nullable of t
    (*

    something that is either t or null

    *)
  12. | Meth of Type_base.meth * t
    (*

    t with a method added

    *)
  13. | Arrow of t Type_base.argument list * t
    (*

    a function

    *)
  14. | Var of var_t
    (*

    a type variable

    *)
type constr = Type_base.constr = {
  1. constr_descr : string;
  2. univ_descr : string option;
  3. satisfied : subtype:(t -> t -> unit) -> satisfies:(t -> unit) -> t -> unit;
}
module Constraints = Type_base.Constraints
type constructed = Type_base.constructed = {
  1. constructor : string;
  2. params : (variance * t) list;
}
type var = Type_base.var = {
  1. name : int;
  2. mutable level : int;
  3. mutable constraints : Constraints.t;
}
type scheme = var list * t
type meth = Type_base.meth = {
  1. meth : string;
  2. optional : bool;
  3. scheme : scheme;
  4. doc : string;
  5. json_name : string option;
}
type repr_t = Type_base.repr_t = {
  1. t : t;
  2. json_repr : [ `Tuple | `Object ];
}
val string_of_constr : constr -> string
val record_constr : constr
val num_constr : constr
val ord_constr : constr
module R = Type_base.R
type 'a argument = bool * string * 'a
exception NotImplemented
exception Exists of Pos.Option.t * string
exception Unsatisfied_constraint
val unit : descr
module Var = Type_base.Var
module Vars = Type_base.Vars
module Fresh : sig ... end

Generate fresh types from existing types.

val fresh : t -> t
val make : ?pos:Pos.t -> descr -> t
val deref : t -> t
val demeth : t -> t
val remeth : t -> t -> t
val invoke : t -> string -> scheme
val has_meth : t -> string -> bool
val invokes : t -> string list -> var list * t
val meth : ?pos:Pos.t -> ?json_name:string -> ?optional:bool -> string -> scheme -> ?doc:string -> t -> t
val reference : ?pos:Pos.t -> t -> t

Type of references on a given type.

val meths : ?pos:Pos.t -> string list -> scheme -> t -> t
val split_meths : t -> meth list * t
val hide_meth : string -> t -> t
val opt_meth : string -> t -> t
val get_meth : string -> t -> meth
val filter_meths : t -> (meth -> bool) -> t
val var : ?constraints:constr list -> ?level:int -> ?pos:Pos.t -> unit -> t
val mk_invariant : t -> unit
val to_string_fun : (?generalized:var list -> t -> string) ref
val to_string : ?generalized:var list -> t -> string
val string_of_scheme : scheme -> string
val is_fun : t -> bool
val is_source : t -> bool
module Custom = Type_custom
val register_type : string -> (unit -> t) -> unit
val find_opt_typ : string -> (unit -> t) option
OCaml

Innovation. Community. Security.