sig
type 'a t
type precedence = Basic | Call | Couple | List | NoPar
val par :
Type.precedence ->
Type.precedence -> Format.formatter -> (Format.formatter -> unit) -> unit
exception AlreadyExists of string
val register :
name:string ->
value_name:string option ->
?pp:(Type.precedence -> Format.formatter -> 'a -> unit) ->
?varname:('a -> string) -> 'a -> 'a Type.t
val name : 'a Type.t -> string
val pp_value_name :
'a Type.t -> Type.precedence -> Format.formatter -> unit
val register_pp :
'a Type.t -> (Type.precedence -> Format.formatter -> 'a -> unit) -> unit
exception NoPrinter of string
val pp : 'a Type.t -> Type.precedence -> Format.formatter -> 'a -> unit
val varname : 'a Type.t -> ('a -> string) option
val use_pp : 'a Type.t -> Format.formatter -> 'a -> unit
exception Not_dynamic of string
type ty
val get_dynamic : string -> Type.ty Type.t
val is_dynamic : 'a Type.t -> bool
val equal : 'a Type.t -> 'b Type.t -> bool
val compare : 'a Type.t -> 'b Type.t -> int
val hash : 'a Type.t -> int
val unit : unit Type.t
val bool : bool Type.t
val int : int Type.t
val int32 : int32 Type.t
val int64 : int64 Type.t
val nativeint : nativeint Type.t
val float : float Type.t
val char : char Type.t
val string : string Type.t
val formatter : Format.formatter Type.t
val no_pp : Type.precedence -> Format.formatter -> 'a -> unit
module type POLYMORPHIC =
sig
type 'a poly
val instantiate : 'a Type.t -> 'a Type.POLYMORPHIC.poly Type.t
val is_instance_of : 'a Type.t -> bool
val get_instance : 'a Type.POLYMORPHIC.poly Type.t -> 'a Type.t
end
module Polymorphic :
functor
(D : sig
val name : 'a Type.t -> string
val value_name : string
type 'a t
val repr : 'a -> 'a Type.Polymorphic.t
val pp :
(Type.precedence -> Format.formatter -> 'a -> unit) ->
Type.precedence ->
Format.formatter -> 'a Type.Polymorphic.t -> unit
end) ->
sig
type 'a poly = 'a D.t
val instantiate : 'a t -> 'a poly t
val is_instance_of : 'a t -> bool
val get_instance : 'a poly t -> 'a t
end
module type POLYMORPHIC2 =
sig
type ('a, 'b) poly
val instantiate :
'a Type.t -> 'b Type.t -> ('a, 'b) Type.POLYMORPHIC2.poly Type.t
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
(D : sig
val name : 'a Type.t -> 'b Type.t -> string
val value_name : string
type ('a, 'b) t
val repr : 'a -> 'b -> ('a, 'b) Type.Polymorphic2.t
val pp :
(Type.precedence -> Format.formatter -> 'a -> unit) ->
(Type.precedence -> Format.formatter -> 'b -> unit) ->
Type.precedence ->
Format.formatter -> ('a, 'b) Type.Polymorphic2.t -> unit
end) ->
sig
type ('a, 'b) poly = ('a, 'b) D.t
val instantiate : 'a t -> 'b t -> ('a, 'b) poly t
val is_instance_of : 'a t -> bool
val get_instance : ('a, 'b) poly t -> 'a t * 'b t
end
module Ref :
sig
type 'a poly = 'a ref
val instantiate : 'a t -> 'a poly t
val is_instance_of : 'a t -> bool
val get_instance : 'a poly t -> 'a t
end
val t_ref : 'a Type.t -> 'a Pervasives.ref Type.t
module Option :
sig
type 'a poly = 'a option
val instantiate : 'a t -> 'a poly t
val is_instance_of : 'a t -> bool
val get_instance : 'a poly t -> 'a t
end
val option : 'a Type.t -> 'a option Type.t
module List :
sig
type 'a poly = 'a list
val instantiate : 'a t -> 'a poly t
val is_instance_of : 'a t -> bool
val get_instance : 'a poly t -> 'a t
end
val list : 'a Type.t -> 'a list Type.t
module Couple :
sig
type ('a, 'b) poly = 'a * 'b
val instantiate : 'a t -> 'b t -> ('a, 'b) poly t
val is_instance_of : 'a t -> bool
val get_instance : ('a, 'b) poly t -> 'a t * 'b t
end
val couple : 'a Type.t -> 'b Type.t -> ('a * 'b) Type.t
module Function :
sig
type ('a, 'b) poly
val instantiate :
?label:string * (unit -> 'a) option ->
'a Type.t -> 'b Type.t -> ('a -> 'b) Type.t
val is_instance_of : 'a Type.t -> bool
val get_instance :
('a, 'b) Type.Function.poly Type.t ->
'a Type.t * 'b Type.t * (string * (unit -> 'a) option) option
end
val func :
?label:string * (unit -> 'a) option ->
'a Type.t -> 'b Type.t -> ('a -> 'b) Type.t
val optlabel_func :
string -> (unit -> 'a) -> 'a Type.t -> 'b Type.t -> ('a -> 'b) Type.t
module StringTbl :
sig
type 'a ty = 'a Type.t
type t
val create : int -> Type.StringTbl.t
val add :
Type.StringTbl.t -> string -> 'a Type.StringTbl.ty -> 'a -> 'a
exception Unbound_value of string
exception Incompatible_type of string
val find : Type.StringTbl.t -> string -> 'a Type.StringTbl.ty -> 'a
end
module TyTbl :
sig
type 'a ty = 'a Type.t
type 'a t
val create : int -> 'a Type.TyTbl.t
val add : 'a Type.TyTbl.t -> 'b Type.TyTbl.ty -> 'a -> unit
val find : 'a Type.TyTbl.t -> 'b Type.TyTbl.ty -> 'a
end
module Binding :
sig
val add : 'a Type.t -> 'a -> string -> unit
exception Name_already_exists of string
val add_once : 'a Type.t -> 'a -> string -> unit
end
val no_obj : unit -> unit
end