module NameSet : Set.S with type elt = Name.t and type t = Set.Make(Name).t
(* Name keyed finite maps *)
+(** Name keyed finite maps *)
module Nfmap : Finite_map.Fmap with type k = Name.t
val nfmap_domain : 'a Nfmap.t > NameSet.t
type name_l = Name.lskips_t * Ast.l
(* Whitespace, comments, and newlines *)
+(** Whitespace, comments, and newlines *)
type lskips = Ast.lex_skips
type 'a lskips_seplist = ('a, lskips) Seplist.t
(* The empty lskip *)
+(** The empty lskip *)
val no_lskips : lskips
(* A space lskip *)
+(** A space lskip *)
val space : lskips
(* Get only the comments (and a trailing space) *)
+(** Get only the comments (and a trailing space) *)
val lskips_only_comments : lskips list > lskips
val ast_target_compare : Ast.target > Ast.target > int
val target_to_ast_target : target > Ast.target
val target_compare : target > target > int
(* target keyed finite maps *)
+(** target keyed finite maps *)
module Targetmap : Finite_map.Fmap with type k = target
module Targetset : Set.S with type elt = target
(* The set of all the possible targets *)
+(** The set of all the possible targets *)
val all_targets : Targetset.t
val target_to_string : target > string
val target_to_output : Output.id_annot > Ast.target > Output.t
val target_to_mname : target > Name.t
(* What kind of toplevel definition a particular constant is *)
+(** What kind of toplevel definition a particular constant is *)
type env_tag =
 (* A class method *)
  K_method

 (* A method instance *)
  K_instance

 (* A val specification that has no definitions *)
  K_val

 (* A let definition with no target specific definitions or val spec *)
  K_let

 (* A definition that also has a val specification. There is a targetspecific
 * definition for each target in the set, and the bool is true if there is a
 * target nonspecific definition *)
+  K_method (** A class method *)
+  K_instance (** A method instance *)
+  K_val (** A val specification that has no definitions *)
+  K_let (** A let definition with no target specific definitions or val spec *)
 K_target of bool * Targetset.t
+ (** A definition that also has a val specification. There is a targetspecific
+ definition for each target in the set, and the bool is true if there is a
+ target nonspecific definition *)
+
type ('a,'b) annot = { term : 'a; locn : Ast.l; typ : Types.t; rest : 'b }
val annot_to_typ : ('a,'b) annot > Types.t
(* Represents a (data) constructor *)
+(** Represents a (data) constructor *)
type constr_descr =
{
 (* The path to the constructor's definition *)
 constr_binding : Path.t;

 (* Its type parameters *)
 constr_tparams : Types.tnvar list;

 (* The types of the constructor's arguments (can refer to the above type
 * parameters) *)
 constr_args : Types.t list;

 (* The type constructor that the constructors value has. Implicitly
 * parameterized by the above type parameters *)
 constr_tconstr : Path.t;

 (* The names of the other (data) constructors of the same type *)
 constr_names : NameSet.t;

 (* The location for the first occurrence of the definition of this constructor *)
 constr_l : Ast.l;
+ constr_binding : Path.t; (** The path to the constructor's definition *)
+ constr_tparams : Types.tnvar list; (** Its type parameters *)
+ constr_args : Types.t list; (** The types of the constructor's arguments (can refer to the above type parameters) *)
+ constr_tconstr : Path.t; (** The type constructor that the constructors value has. Implicitly parameterized by the above type parameters *)
+ constr_names : NameSet.t; (** The names of the other (data) constructors of the same type *)
+ constr_l : Ast.l; (** The location for the first occurrence of the definition of this constructor *)
}
(* Represents a field *)
+(** Represents a field *)
type field_descr =
{
 (* The path to the field's definition *)
 field_binding : Path.t;
+ field_binding : Path.t;
+ (** The path to the field's definition *)
 (* Its type parameters *)
field_tparams : Types.tnvar list;
+ (** Its type parameters *)
 (* The type constructor of the record that the field belongs to.
 * Implicitly parameterized by the above type parameters *)
field_tconstr : Path.t;
+ (** The type constructor of the record that the field belongs to.
+ Implicitly parameterized by the above type parameters *)
 (* The type of the field (can refer to the above type parameters) *)
field_arg : Types.t;
+ (** The type of the field (can refer to the above type parameters) *)
 (* The names of the other fields of the same record type *)
field_names : Name.t list;
+ (** The names of the other fields of the same record type *)
 (* The location for the first occurrence of the definition of this field *)
field_l : Ast.l;
+ (** The location for the first occurrence of the definition of this field *)
}
(* Maps a type name to the unique path representing that type and
 the first location this type is defined and any regular expression
 identifiers of this type should respect
+(** Maps a type name to the unique path representing that type and
+ the first location this type is defined and any regular expression
+ identifiers of this type should respect
*)
type p_env = (Path.t * Ast.l) Nfmap.t
 Id_some of Ident.t
(* Represents a usage of an 'a (usually in constr_descr, field_descr,
 * const_descr) *)
+(** Represents a usage of an 'a (usually in constr_descr, field_descr,
+ const_descr) *)
type 'a id =
{
 (* The identifier as written at the usage point. None if it is generated
 * internally, and therefore has no original source *)
id_path : ident_option;
+ (** The identifier as written at the usage point. None if it is generated
+ internally, and therefore has no original source *)
 (* The location of the usage point *)
id_locn : Ast.l;
+ (** The location of the usage point *)
 (* A description of the binding that the usage refers to *)
descr : 'a;
+ (** A description of the binding that the usage refers to *)
 (* The usage site instantiation of the type parameters of the definition *)
instantiation : Types.t list;
+ (** The usage site instantiation of the type parameters of the definition *)
}
* would appear (e.g., a keyword), and represent the comments and whitespace
* that preceded that concrete element. They do not represent the element
* itself *)

and src_t = (src_t_aux,unit) annot
and src_t_aux =
and src_nexp_aux =
 Nexp_var of lskips * Nvar.t
 Nexp_const of lskips * int
  Nexp_mult of src_nexp * lskips * src_nexp (* One will always be const *)
+  Nexp_mult of src_nexp * lskips * src_nexp (** One will always be const *)
 Nexp_add of src_nexp * lskips * src_nexp
 Nexp_paren of lskips * src_nexp * lskips
and lit_aux =
 L_true of lskips
 L_false of lskips
  L_zero of lskips (* This is a bit, not a num *)
  L_one of lskips (* see above *)
+  L_zero of lskips (** This is a bit, not a num *)
+  L_one of lskips (** see above *)
 L_num of lskips * int
 L_string of lskips * string
 L_unit of lskips * lskips
  L_vector of lskips * string * string (* For vectors of bits, specified with hex or binary, first string is either 0b or 0x, second is the binary or hex number as a string *)
+  L_vector of lskips * string * string (** For vectors of bits, specified with hex or binary, first string is either 0b or 0x, second is the binary or hex number as a string *)
 L_undefined of lskips * string (** A special undefined value that explicitly states that nothing is known about it. This is useful for expressing underspecified functions. It has been introduced to easier support pattern compilation of nonexhaustive patterns. *)
type pat = (pat_aux,pat_annot) annot
 P_cons of pat * lskips * pat
 P_num_add of name_l * lskips * lskips * int
 P_lit of lit
 (* A typeannotated pattern variable. This is redundant with the combination
 * of the P_typ and P_var cases above, but useful as a macro target. *)
 P_var_annot of Name.lskips_t * src_t
+ (** A typeannotated pattern variable. This is redundant with the combination
+ of the P_typ and P_var cases above, but useful as a macro target. *)
(* The description of a toplevel definition *)
+(** The description of a toplevel definition *)
and const_descr =
{
 (* The path to the definition *)
const_binding : Path.t;
+ (** The path to the definition *)
 (* Its type parameters. Must have length 1 for class methods. *)
const_tparams : Types.tnvar list;
+ (** Its type parameters. Must have length 1 for class methods. *)
 (* Its class constraints (must refer to above type parameters). Must have
 * length 1 for class methods *)
const_class : (Path.t * Types.tnvar) list;
+ (** Its class constraints (must refer to above type parameters). Must have
+ length 1 for class methods *)
 (* Its length constraints (must refer to above type parameters). Can be equality or GtEq inequalities *)
const_ranges : Types.range list;
+ (** Its length constraints (must refer to above type parameters). Can be equality or GtEq inequalities *)
 (* Its type *)
const_type : Types.t;
+ (** Its type *)
 (* What kind of definition it is. *)
env_tag : env_tag;
+ (** What kind of definition it is. *)
 (* The location for the first occurrence of a definition/specification of
 * this constant *)
spec_l : Ast.l;
+ (** The location for the first occurrence of a definition/specification of
+ this constant *)
 (* Targetspecific substitutions to use for this constant *)
substitutions : ((Name.t,unit) annot list * exp) Targetmap.t;
+ (** Targetspecific substitutions to use for this constant *)
}
and val_descr =
 Fun of lskips * pat list * lskips * exp
 Function of lskips * (pat * lskips * exp * Ast.l) lskips_seplist * lskips
 App of exp * exp
 (* The middle exp must be a Var, Constant, or Constructor *)
  Infix of exp * exp * exp
+  Infix of exp * exp * exp (** The middle exp must be a Var, Constant, or Constructor *)
src/typed_ast.mli