sig
type 'a t
type 'a ty = 'a Type.t
type precedence = Basic | Call | Tuple | List | NoPar
val par :
Type.precedence ->
Type.precedence -> Format.formatter -> (Format.formatter -> unit) -> unit
val par_ty_name : ('a Type.t -> bool) -> 'a Type.t -> string
exception AlreadyExists of string
val register :
?closure:bool ->
name:string ->
ml_name:string option -> Structural_descr.t -> 'a list -> 'a Type.t
exception No_abstract_type of string
module Abstract :
functor (T : sig val name : string end) ->
sig type t val ty : Type.Abstract.t Type.ty end
val name : 'a Type.t -> string
val structural_descr : 'a Type.t -> Structural_descr.t
val reprs : 'a Type.t -> 'a list
val digest : 'a Type.t -> Digest.t
val get_embedded_type_names : 'a Type.t -> string list
val ml_name : 'a Type.t -> string
val pp_ml_name : 'a Type.t -> Type.precedence -> Format.formatter -> unit
val set_ml_name : 'a Type.t -> string option -> unit
val set_name : 'a Type.t -> string -> unit
val equal : 'a Type.t -> 'b Type.t -> bool
val compare : 'a Type.t -> 'b Type.t -> int
val hash : 'a Type.t -> int
module type Polymorphic_input =
sig
val name : 'a Type.t -> string
val module_name : string
val structural_descr : Structural_descr.t -> Structural_descr.t
type 'a t
val reprs : 'a -> 'a Type.Polymorphic_input.t list
end
module type Polymorphic =
sig
type 'a poly
val instantiate : 'a Type.t -> 'a Type.Polymorphic.poly Type.t * bool
val is_instance_of : 'a Type.t -> bool
val get_instance : 'a Type.Polymorphic.poly Type.t -> 'a Type.t
end
module Polymorphic :
functor (T : Polymorphic_input) ->
sig
type 'a poly = 'a T.t
val instantiate : 'a t -> 'a poly t * bool
val is_instance_of : 'a t -> bool
val get_instance : 'a poly t -> 'a t
end
module type Polymorphic2_input =
sig
val name : 'a Type.t -> 'b Type.t -> string
val module_name : string
val structural_descr :
Structural_descr.t -> Structural_descr.t -> Structural_descr.t
type ('a, 'b) t
val reprs : 'a -> 'b -> ('a, 'b) Type.Polymorphic2_input.t list
end
module type Polymorphic2 =
sig
type ('a, 'b) poly
val instantiate :
'a Type.t ->
'b Type.t -> ('a, 'b) Type.Polymorphic2.poly Type.t * bool
val is_instance_of : 'a Type.t -> bool
val get_instance :
('a, 'b) Type.Polymorphic2.poly Type.t -> 'a Type.t * 'b Type.t
end
module Polymorphic2 :
functor (T : Polymorphic2_input) ->
sig
type ('a, 'b) poly = ('a, 'b) T.t
val instantiate : 'a t -> 'b t -> ('a, 'b) poly t * bool
val is_instance_of : 'a t -> bool
val get_instance : ('a, 'b) poly t -> 'a t * 'b t
end
module Function :
sig
type ('a, 'b) poly = 'a -> 'b
val instantiate :
?label:string * (unit -> 'a) option ->
'a Type.t -> 'b Type.t -> ('a -> 'b) Type.t * bool
val is_instance_of : 'a Type.t -> bool
val get_instance :
('a -> 'b) Type.t -> 'a Type.t * 'b Type.t * string option
val get_optional_argument : ('a -> 'b) Type.t -> (unit -> 'a) option
end
module type Polymorphic3_input =
sig
val name : 'a Type.t -> 'b Type.t -> 'c Type.t -> string
val module_name : string
val structural_descr :
Structural_descr.t ->
Structural_descr.t -> Structural_descr.t -> Structural_descr.t
type ('a, 'b, 'c) t
val reprs :
'a -> 'b -> 'c -> ('a, 'b, 'c) Type.Polymorphic3_input.t list
end
module type Polymorphic3 =
sig
type ('a, 'b, 'c) poly
val instantiate :
'a Type.t ->
'b Type.t ->
'c Type.t -> ('a, 'b, 'c) Type.Polymorphic3.poly Type.t * bool
val is_instance_of : 'a Type.t -> bool
val get_instance :
('a, 'b, 'c) Type.Polymorphic3.poly Type.t ->
'a Type.t * 'b Type.t * 'c Type.t
end
module Polymorphic3 :
functor (T : Polymorphic3_input) ->
sig
type ('a, 'b, 'c) poly = ('a, 'b, 'c) T.t
val instantiate : 'a t -> 'b t -> 'c t -> ('a, 'b, 'c) poly t * bool
val is_instance_of : 'a t -> bool
val get_instance : ('a, 'b, 'c) poly t -> 'a t * 'b t * 'c t
end
module type Polymorphic4_input =
sig
val name : 'a Type.t -> 'b Type.t -> 'c Type.t -> 'd Type.t -> string
val module_name : string
val structural_descr :
Structural_descr.t ->
Structural_descr.t ->
Structural_descr.t -> Structural_descr.t -> Structural_descr.t
type ('a, 'b, 'c, 'd) t
val reprs :
'a ->
'b -> 'c -> 'd -> ('a, 'b, 'c, 'd) Type.Polymorphic4_input.t list
end
module type Polymorphic4 =
sig
type ('a, 'b, 'c, 'd) poly
val instantiate :
'a Type.t ->
'b Type.t ->
'c Type.t ->
'd Type.t -> ('a, 'b, 'c, 'd) Type.Polymorphic4.poly Type.t * bool
val is_instance_of : 'a Type.t -> bool
val get_instance :
('a, 'b, 'c, 'd) Type.Polymorphic4.poly Type.t ->
'a Type.t * 'b Type.t * 'c Type.t * 'd Type.t
end
module Polymorphic4 :
functor (T : Polymorphic4_input) ->
sig
type ('a, 'b, 'c, 'd) poly = ('a, 'b, 'c, 'd) T.t
val instantiate :
'a t -> 'b t -> 'c t -> 'd t -> ('a, 'b, 'c, 'd) poly t * bool
val is_instance_of : 'a t -> bool
val get_instance :
('a, 'b, 'c, 'd) poly t -> 'a t * 'b t * 'c t * 'd t
end
module type Heterogeneous_table =
sig
type key
type 'a info
type t
val create : int -> Type.Heterogeneous_table.t
val add :
Type.Heterogeneous_table.t ->
Type.Heterogeneous_table.key ->
'a Type.ty -> 'a Type.Heterogeneous_table.info -> unit
exception Unbound_value of string
exception Incompatible_type of string
val find :
Type.Heterogeneous_table.t ->
Type.Heterogeneous_table.key ->
'a Type.ty -> 'a Type.Heterogeneous_table.info
val iter :
(Type.Heterogeneous_table.key ->
'a Type.ty -> 'a Type.Heterogeneous_table.info -> unit) ->
Type.Heterogeneous_table.t -> unit
val fold :
(Type.Heterogeneous_table.key ->
'a Type.ty -> 'a Type.Heterogeneous_table.info -> 'b -> 'b) ->
Type.Heterogeneous_table.t -> 'b -> 'b
end
module Make_tbl :
functor
(Key : sig
type t
val equal : t -> t -> bool
val hash : t -> int
val to_string : Type.t -> string
end) (Info : sig type 'a t end) ->
sig
type key = Key.t
type 'a info = 'a Info.t
type t
val create : int -> t
val add : t -> key -> 'a ty -> 'a info -> unit
exception Unbound_value of string
exception Incompatible_type of string
val find : t -> key -> 'a ty -> 'a info
val iter : (key -> 'a ty -> 'a info -> unit) -> t -> unit
val fold : (key -> 'a ty -> 'a info -> 'b -> 'b) -> t -> 'b -> 'b
end
module String_tbl :
functor (Info : sig type 'a t end) ->
sig
type key = string
type 'a info = 'a Info.t
type t
val create : int -> t
val add : t -> key -> 'a ty -> 'a info -> unit
exception Unbound_value of string
exception Incompatible_type of string
val find : t -> key -> 'a ty -> 'a info
val iter : (key -> 'a ty -> 'a info -> unit) -> t -> unit
val fold : (key -> 'a ty -> 'a info -> 'b -> 'b) -> t -> 'b -> 'b
end
module Ty_tbl :
functor (Info : sig type 'a t end) ->
sig
type t
val create : int -> Type.Ty_tbl.t
val add : Type.Ty_tbl.t -> 'b Type.ty -> 'b Info.t -> unit
val find : Type.Ty_tbl.t -> 'b Type.ty -> 'b Info.t
end
module Obj_tbl :
sig
type 'a t
val create : unit -> 'a Type.Obj_tbl.t
val add : 'a Type.Obj_tbl.t -> 'b Type.ty -> 'b -> 'a -> unit
val find : 'a Type.Obj_tbl.t -> 'b Type.ty -> 'b -> 'a
val mem : 'a Type.Obj_tbl.t -> 'b Type.ty -> 'b -> bool
val iter :
'b Type.Obj_tbl.t -> ('a Type.ty -> 'a -> 'b -> unit) -> unit
end
val no_obj : unit -> unit
val may_use_obj : unit -> bool
val add_abstract_types : (string -> string -> unit) Pervasives.ref
val sfprintf :
('a, Format.formatter, unit, string) Pervasives.format4 -> 'a
end