package links
Core types
type 'a stringmap = 'a Utility.StringMap.t
val pp_stringmap :
(Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) ->
Ppx_deriving_runtime.Format.formatter ->
'a stringmap ->
Ppx_deriving_runtime.unit
val show_stringmap :
(Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) ->
'a stringmap ->
Ppx_deriving_runtime.string
type 'a field_env = 'a stringmap
val pp_field_env :
(Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) ->
Ppx_deriving_runtime.Format.formatter ->
'a field_env ->
Ppx_deriving_runtime.unit
val show_field_env :
(Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) ->
'a field_env ->
Ppx_deriving_runtime.string
module TypeVarSet : sig ... end
module TypeVarMap : Utility.INTMAP
type 'a point = 'a Unionfind.point
type 't meta_type_var_non_rec_basis = [
| `Var of int * CommonTypes.Subkind.t * CommonTypes.Freedom.t
| `Body of 't
]
type 't meta_presence_var_basis = 't meta_type_var_non_rec_basis
type 't meta_max_basis = 't meta_row_var_basis
module Abstype : sig ... end
module Vars : sig ... end
module Print : sig ... end
val process : Abstype.t
val list : Abstype.t
val event : Abstype.t
val dom_node : Abstype.t
val access_point : Abstype.t
val socket : Abstype.t
val spawn_location : Abstype.t
val pp_rec_id :
Ppx_deriving_runtime.Format.formatter ->
rec_id ->
Ppx_deriving_runtime.unit
val show_rec_id : rec_id -> Ppx_deriving_runtime.string
module type RECIDMAP = Utility.Map with type key = rec_id
module type RECIDSET = Utility.Set with type elt = rec_id
type tygroup = {
id : int;
type_map : (CommonTypes.Quantifier.t list * typ) Utility.StringMap.t;
linearity_map : bool Utility.StringMap.t;
}
and rec_appl = {
r_name : string;
r_dual : bool;
r_unique_name : string;
r_quantifiers : CommonTypes.Kind.t list;
r_args : type_arg list;
r_unwind : type_arg list -> bool -> typ;
r_linear : unit -> bool option;
}
and typ = [
| `Not_typed
| `Primitive of CommonTypes.Primitive.t
| `Function of typ * row * typ
| `Lolli of typ * row * typ
| `Record of row
| `Variant of row
| `Effect of row
| `Table of typ * typ * typ
| `Lens of Links_core.Lens.Type.t
| `Alias of (string * CommonTypes.Kind.t list * type_arg list) * typ
| `Application of Abstype.t * type_arg list
| `RecursiveApplication of rec_appl
| `MetaTypeVar of meta_type_var
| `ForAll of CommonTypes.Quantifier.t list * typ
| (typ, row) session_type_basis
]
and field_spec_map = field_spec field_env
and row_var = meta_row_var
and row = field_spec_map * row_var * bool
and meta_type_var = typ meta_type_var_basis point
and meta_row_var = row meta_row_var_basis point
and meta_presence_var = field_spec meta_presence_var_basis point
val pp_tygroup :
Ppx_deriving_runtime.Format.formatter ->
tygroup ->
Ppx_deriving_runtime.unit
val show_tygroup : tygroup -> Ppx_deriving_runtime.string
val pp_rec_appl :
Ppx_deriving_runtime.Format.formatter ->
rec_appl ->
Ppx_deriving_runtime.unit
val show_rec_appl : rec_appl -> Ppx_deriving_runtime.string
val pp_typ :
Ppx_deriving_runtime.Format.formatter ->
typ ->
Ppx_deriving_runtime.unit
val show_typ : typ -> Ppx_deriving_runtime.string
val pp_field_spec :
Ppx_deriving_runtime.Format.formatter ->
field_spec ->
Ppx_deriving_runtime.unit
val show_field_spec : field_spec -> Ppx_deriving_runtime.string
val pp_field_spec_map :
Ppx_deriving_runtime.Format.formatter ->
field_spec_map ->
Ppx_deriving_runtime.unit
val show_field_spec_map : field_spec_map -> Ppx_deriving_runtime.string
val pp_row_var :
Ppx_deriving_runtime.Format.formatter ->
row_var ->
Ppx_deriving_runtime.unit
val show_row_var : row_var -> Ppx_deriving_runtime.string
val pp_row :
Ppx_deriving_runtime.Format.formatter ->
row ->
Ppx_deriving_runtime.unit
val show_row : row -> Ppx_deriving_runtime.string
val pp_meta_type_var :
Ppx_deriving_runtime.Format.formatter ->
meta_type_var ->
Ppx_deriving_runtime.unit
val show_meta_type_var : meta_type_var -> Ppx_deriving_runtime.string
val pp_meta_row_var :
Ppx_deriving_runtime.Format.formatter ->
meta_row_var ->
Ppx_deriving_runtime.unit
val show_meta_row_var : meta_row_var -> Ppx_deriving_runtime.string
val pp_meta_presence_var :
Ppx_deriving_runtime.Format.formatter ->
meta_presence_var ->
Ppx_deriving_runtime.unit
val show_meta_presence_var : meta_presence_var -> Ppx_deriving_runtime.string
val pp_meta_var :
Ppx_deriving_runtime.Format.formatter ->
meta_var ->
Ppx_deriving_runtime.unit
val show_meta_var : meta_var -> Ppx_deriving_runtime.string
val pp_type_arg :
Ppx_deriving_runtime.Format.formatter ->
type_arg ->
Ppx_deriving_runtime.unit
val show_type_arg : type_arg -> Ppx_deriving_runtime.string
type session_type = (typ, row) session_type_basis
type datatype = typ
module type Constraint = sig ... end
A constraint that a subkind imposes on types.
module Base : Constraint
module Unl : Constraint
module Session : Constraint
module Mono : Constraint
val get_restriction_constraint :
CommonTypes.Restriction.t ->
(module Constraint) option
Get a Constraint
for a specific subkind Restriction.t
.
type alias_type = CommonTypes.Quantifier.t list * typ
val pp_alias_type :
Ppx_deriving_runtime.Format.formatter ->
alias_type ->
Ppx_deriving_runtime.unit
val show_alias_type : alias_type -> Ppx_deriving_runtime.string
type tycon_spec = [
| `Alias of alias_type
| `Abstract of Abstype.t
| `Mutual of CommonTypes.Quantifier.t list * tygroup ref
]
type environment = datatype Env.String.t
type tycon_environment = tycon_spec Env.String.t
type typing_environment = {
var_env : environment;
rec_vars : Utility.StringSet.t;
tycon_env : tycon_environment;
effect_row : row;
desugared : bool;
}
val empty_typing_environment : typing_environment
val concrete_field_spec : field_spec -> field_spec
val normalise_typing_environment : typing_environment -> typing_environment
val for_all : (CommonTypes.Quantifier.t list * datatype) -> datatype
val unit_type : datatype
useful types
val string_type : datatype
val keys_type : datatype
val char_type : datatype
val bool_type : datatype
val int_type : datatype
val float_type : datatype
val database_type : datatype
val xml_type : datatype
val empty_type : datatype
val free_type_vars : datatype -> TypeVarSet.t
get type variables
val free_row_type_vars : row -> TypeVarSet.t
val free_tyarg_vars : type_arg -> TypeVarSet.t
val free_bound_type_vars : typ -> Vars.vars_list
val free_bound_row_type_vars : row -> Vars.vars_list
val free_bound_type_arg_type_vars : type_arg -> Vars.vars_list
val type_arg_of_quantifier : CommonTypes.Quantifier.t -> type_arg
val quantifier_of_type_arg : type_arg -> CommonTypes.Quantifier.t
val quantifiers_of_type_args : type_arg list -> CommonTypes.Quantifier.t list
val primary_kind_of_type_arg : type_arg -> CommonTypes.PrimaryKind.t
val type_variable_counter : int ref
Fresh type variables
val make_type_variable : int -> CommonTypes.Subkind.t -> datatype
type variable construction
val make_rigid_type_variable : int -> CommonTypes.Subkind.t -> datatype
val make_row_variable : int -> CommonTypes.Subkind.t -> row_var
val make_rigid_row_variable : int -> CommonTypes.Subkind.t -> row_var
val make_rigid_presence_variable : int -> CommonTypes.Subkind.t -> field_spec
val fresh_type_variable : CommonTypes.Subkind.t -> datatype
fresh type variable generation
val fresh_rigid_type_variable : CommonTypes.Subkind.t -> datatype
val fresh_row_variable : CommonTypes.Subkind.t -> row_var
val fresh_rigid_row_variable : CommonTypes.Subkind.t -> row_var
val fresh_session_variable : CommonTypes.Linearity.t -> datatype
val fresh_presence_variable : CommonTypes.Subkind.t -> field_spec
val fresh_rigid_presence_variable : CommonTypes.Subkind.t -> field_spec
val fresh_type_quantifier :
CommonTypes.Subkind.t ->
CommonTypes.Quantifier.t * datatype
fresh quantifiers
val fresh_row_quantifier :
CommonTypes.Subkind.t ->
CommonTypes.Quantifier.t * row
val fresh_presence_quantifier :
CommonTypes.Subkind.t ->
CommonTypes.Quantifier.t * field_spec
val fresh_quantifier :
CommonTypes.Kind.t ->
CommonTypes.Quantifier.t * type_arg
val make_empty_closed_row : unit -> row
empty row constructors
val make_empty_open_row : CommonTypes.Subkind.t -> row
val make_singleton_closed_row : (string * field_spec) -> row
singleton row constructors
val make_singleton_open_row :
(string * field_spec) ->
CommonTypes.Subkind.t ->
row
val is_closed_row : row -> bool
row predicates
val is_absent_from_row : string -> row -> bool
val is_tuple : ?allow_onetuples:bool -> row -> bool
val get_row_var : row -> int option
row_var retrieval
val row_with : (string * field_spec) -> row -> row
val empty_field_env : field_spec_map
constants
val closed_row_var : row_var
val field_env_union : (field_spec_map * field_spec_map) -> field_spec_map
val is_canonical_row_var : row_var -> bool
val is_rigid_row : row -> bool
val is_rigid_row_with_var : int -> row -> bool
val is_flattened_row : row -> bool
val is_empty_row : row -> bool
Convert a row to the form (field_env, row_var) where row_var is of the form: `Closed
| `Flexible var
| `Rigid var
| `Recursive
As flatten_row except if the flattened row_var is of the form:
`Recursive (var, rec_row)
then it is unwrapped. This ensures that all the fields are exposed in field_env.
Also returns the outermost `Recursive that was unwrapped if it exists, or None otherwise.
val make_endbang_type : datatype
type inference_type_map =
datatype Unionfind.point Utility.IntMap.t ref
* row Unionfind.point Utility.IntMap.t ref
environments
val extend_typing_environment :
typing_environment ->
typing_environment ->
typing_environment
val make_fresh_envs :
datatype ->
datatype Utility.IntMap.t
* row Utility.IntMap.t
* field_spec Utility.IntMap.t
val make_rigid_envs :
datatype ->
datatype Utility.IntMap.t
* row Utility.IntMap.t
* field_spec Utility.IntMap.t
val make_wobbly_envs :
datatype ->
datatype Utility.IntMap.t
* row Utility.IntMap.t
* field_spec Utility.IntMap.t
val effect_sugar : bool Settings.setting
val string_of_datatype :
?policy:(unit -> Print.policy) ->
?refresh_tyvar_names:bool ->
datatype ->
string
pretty printing
val string_of_row :
?policy:(unit -> Print.policy) ->
?refresh_tyvar_names:bool ->
row ->
string
val string_of_presence :
?policy:(unit -> Print.policy) ->
?refresh_tyvar_names:bool ->
field_spec ->
string
val string_of_type_arg :
?policy:(unit -> Print.policy) ->
?refresh_tyvar_names:bool ->
type_arg ->
string
val string_of_row_var :
?policy:(unit -> Print.policy) ->
?refresh_tyvar_names:bool ->
row_var ->
string
val string_of_tycon_spec :
?policy:(unit -> Print.policy) ->
?refresh_tyvar_names:bool ->
tycon_spec ->
string
val string_of_environment : environment -> string
val string_of_typing_environment : typing_environment -> string
val build_tyvar_names :
refresh_tyvar_names:bool ->
('a -> Vars.vars_list) ->
'a list ->
unit
generating type variable names
val add_tyvar_names : ('a -> Vars.vars_list) -> 'a list -> unit
val pp_datatype : Format.formatter -> datatype -> unit
val pp_tycon_spec : Format.formatter -> tycon_spec -> unit
module type TYPE_VISITOR = sig ... end
type visit_context = Utility.StringSet.t * TypeVarSet.t * TypeVarSet.t
class virtual type_predicate : object ... end
module Transform : TYPE_VISITOR