package liquidsoap-lang

  1. Overview
  2. Docs

User-friendly representation of types.

val show_record_schemes : bool ref

Show generalized variables in records.

val global_evar_names : bool ref

Use globally unique names for existential variables.

include module type of struct include Type_base.R end
type 'a meth = 'a Type_base.R.meth = {
  1. name : string;
  2. optional : bool;
  3. scheme : 'a var list * 'a {t}9;
  4. json_name : string option;
}
and 'a var = string * 'a Type_constraints.t
val excerpt : Pos.t -> string option

Given a position, find the relevant excerpt.

val excerpt_opt : Pos.t option -> string option
val name : int -> string

Given a strictly positive integer, generate a name in a-z+: a, b, ... z, aa, ab, ... az, ba, ...

val evar_global_name : int -> string

Generate a globally unique name for evars (used for debugging only).

val make : ?filter_out:(Type_base.t -> bool) -> ?generalized:Type_base.var list -> Type_base.t -> t

Compute the structure that a term represents, given the list of universally quantified variables. Also takes care of computing the printing name of variables, including constraint symbols, which are removed from constraint lists. It supports a mechanism for filtering out parts of the type, which are then translated as `Ellipsis.

Print a type representation. Unless in debug mode, variable identifiers are not shown, and variable names are generated. Names are only meaningful over one printing, as they are re-used.

val to_string : Type_base.constr Type_base.R.t -> string
val print_type : Format.formatter -> Type_base.t -> unit
val print_scheme : Format.formatter -> (Type_base.var list * Type_base.t) -> unit
val string_of_type : ?generalized:Type_base.var list -> Type_base.t -> string

String representation of a type.

val string_of_scheme : (Type_base.var list * Type_base.t) -> string

String representation of a type scheme.

type explanation = bool * Type_base.t * Type_base.t * t * t
exception Type_error of explanation
val print_type_error : formatter:Format.formatter -> (Pos.Option.t -> 'a) -> explanation -> unit
OCaml

Innovation. Community. Security.