package liquidsoap-lang

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

Module Liquidsoap_lang.ReprSource

User-friendly representation of types.

Sourceval show_record_schemes : bool ref

Show generalized variables in records.

Sourceval 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}1/shadowed/(a65def90967bfb097a07d40d034fec4c);
  4. json_name : string option;
}
and 'a var = string * 'a Type_constraints.t
Sourceval excerpt : bytes -> string option

Given a position, find the relevant excerpt.

Sourceval excerpt_opt : bytes option -> string option
Sourceval name : int -> string

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

Sourceval evar_global_name : int -> string

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

Sourceval 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.

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

String representation of a type.

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

String representation of a type scheme.

Sourcetype explanation = bool * Type_base.t * Type_base.t * t * t
Sourceexception Type_error of explanation
Sourceval print_type_error : formatter:Format.formatter -> (Pos.Option.t -> 'a) -> explanation -> unit