2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. This file is distributed under the terms of *)
|
|
|
|
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
1995-08-09 08:06:35 -07:00
|
|
|
|
1995-07-25 04:40:07 -07:00
|
|
|
(* Compute constructor and label descriptions from type declarations,
|
|
|
|
determining their representation. *)
|
|
|
|
|
1996-09-23 04:33:27 -07:00
|
|
|
open Types
|
1995-07-25 04:40:07 -07:00
|
|
|
|
2014-05-04 16:08:45 -07:00
|
|
|
val extension_descr:
|
2019-08-20 01:53:05 -07:00
|
|
|
current_unit:string -> Path.t -> extension_constructor ->
|
|
|
|
constructor_description
|
2014-10-03 04:29:58 -07:00
|
|
|
|
|
|
|
val labels_of_type:
|
|
|
|
Path.t -> type_declaration ->
|
|
|
|
(Ident.t * label_description) list
|
|
|
|
val constructors_of_type:
|
2019-08-20 01:53:05 -07:00
|
|
|
current_unit:string -> Path.t -> type_declaration ->
|
2014-10-03 04:29:58 -07:00
|
|
|
(Ident.t * constructor_description) list
|
|
|
|
|
1999-10-29 07:42:37 -07:00
|
|
|
|
|
|
|
exception Constr_not_found
|
|
|
|
|
|
|
|
val find_constr_by_tag:
|
2013-09-27 03:54:55 -07:00
|
|
|
constructor_tag -> constructor_declaration list ->
|
|
|
|
constructor_declaration
|
2016-05-25 07:29:05 -07:00
|
|
|
|
|
|
|
val constructor_existentials :
|
|
|
|
constructor_arguments -> type_expr option -> type_expr list * type_expr list
|
|
|
|
(** Takes [cd_args] and [cd_res] from a [constructor_declaration] and
|
|
|
|
returns:
|
|
|
|
- the types of the constructor's arguments
|
|
|
|
- the existential variables introduced by the constructor
|
|
|
|
*)
|
2017-09-16 02:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
(* Set the polymorphic variant row_name field *)
|
|
|
|
val set_row_name : type_declaration -> Path.t -> unit
|