1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
2015-01-06 09:15:36 -08:00
|
|
|
(** Abstract syntax tree after typing *)
|
|
|
|
|
|
|
|
|
|
|
|
(** By comparison with {!Parsetree}:
|
|
|
|
- Every {!Longindent.t} is accompanied by a resolved {!Path.t}.
|
|
|
|
|
|
|
|
*)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
open Asttypes
|
1996-09-23 04:33:27 -07:00
|
|
|
open Types
|
1996-04-22 04:15:41 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Value expressions for the core language *)
|
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
type partial = Partial | Total
|
|
|
|
|
2015-01-06 09:15:36 -08:00
|
|
|
(** {2 Extension points} *)
|
|
|
|
|
2013-07-22 07:58:15 -07:00
|
|
|
type attribute = Parsetree.attribute
|
2013-04-10 11:00:11 -07:00
|
|
|
type attributes = attribute list
|
2013-03-25 07:16:07 -07:00
|
|
|
|
2015-01-06 09:15:36 -08:00
|
|
|
(** {2 Core language} *)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
type pattern =
|
|
|
|
{ pat_desc: pattern_desc;
|
|
|
|
pat_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
pat_extra : (pat_extra * Location.t * attributes) list;
|
1998-04-06 02:23:01 -07:00
|
|
|
pat_type: type_expr;
|
2013-03-25 07:16:07 -07:00
|
|
|
mutable pat_env: Env.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
pat_attributes: attributes;
|
2013-03-25 07:16:07 -07:00
|
|
|
}
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
and pat_extra =
|
|
|
|
| Tpat_constraint of core_type
|
2015-01-06 09:15:36 -08:00
|
|
|
(** P : T { pat_desc = P
|
|
|
|
; pat_extra = (Tpat_constraint T, _, _) :: ... }
|
|
|
|
*)
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tpat_type of Path.t * Longident.t loc
|
2015-01-06 09:15:36 -08:00
|
|
|
(** #tconst { pat_desc = disjunction
|
|
|
|
; pat_extra = (Tpat_type (P, "tconst"), _, _) :: ... }
|
|
|
|
|
|
|
|
where [disjunction] is a [Tpat_or _] representing the
|
|
|
|
branches of [tconst].
|
|
|
|
*)
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tpat_unpack
|
2015-01-06 09:15:36 -08:00
|
|
|
(** (module P) { pat_desc = Tpat_var "P"
|
|
|
|
; pat_extra = (Tpat_unpack, _, _) :: ... }
|
|
|
|
*)
|
2012-05-30 07:52:37 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
and pattern_desc =
|
|
|
|
Tpat_any
|
2015-01-06 09:15:36 -08:00
|
|
|
(** _ *)
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tpat_var of Ident.t * string loc
|
2015-01-06 09:15:36 -08:00
|
|
|
(** x *)
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tpat_alias of pattern * Ident.t * string loc
|
2015-01-06 09:15:36 -08:00
|
|
|
(** P as a *)
|
1995-05-04 03:15:53 -07:00
|
|
|
| Tpat_constant of constant
|
2015-01-06 09:15:36 -08:00
|
|
|
(** 1, 'a', "true", 1.0, 1l, 1L, 1n *)
|
1995-05-04 03:15:53 -07:00
|
|
|
| Tpat_tuple of pattern list
|
2015-01-06 09:15:36 -08:00
|
|
|
(** (P1, ..., Pn)
|
|
|
|
|
|
|
|
Invariant: n >= 2
|
|
|
|
*)
|
2012-05-31 01:07:31 -07:00
|
|
|
| Tpat_construct of
|
2013-04-17 02:46:52 -07:00
|
|
|
Longident.t loc * constructor_description * pattern list
|
2015-01-06 09:15:36 -08:00
|
|
|
(** C []
|
|
|
|
C P [P]
|
|
|
|
C (P1, ..., Pn) [P1; ...; Pn]
|
|
|
|
*)
|
2008-01-11 08:13:18 -08:00
|
|
|
| Tpat_variant of label * pattern option * row_desc ref
|
2015-01-06 09:15:36 -08:00
|
|
|
(** `A (None)
|
|
|
|
`A P (Some P)
|
|
|
|
|
|
|
|
See {!Types.row_desc} for an explanation of the last parameter.
|
|
|
|
*)
|
2012-05-31 01:07:31 -07:00
|
|
|
| Tpat_record of
|
2012-10-24 05:03:00 -07:00
|
|
|
(Longident.t loc * label_description * pattern) list *
|
2012-05-31 01:07:31 -07:00
|
|
|
closed_flag
|
2015-01-06 09:15:36 -08:00
|
|
|
(** { l1=P1; ...; ln=Pn } (flag = Closed)
|
|
|
|
{ l1=P1; ...; ln=Pn; _} (flag = Open)
|
|
|
|
|
|
|
|
Invariant: n > 0
|
|
|
|
*)
|
1998-04-06 02:23:01 -07:00
|
|
|
| Tpat_array of pattern list
|
2015-01-06 09:15:36 -08:00
|
|
|
(** [| P1; ...; Pn |] *)
|
2008-01-11 08:13:18 -08:00
|
|
|
| Tpat_or of pattern * pattern * row_desc option
|
2015-01-06 09:15:36 -08:00
|
|
|
(** P1 | P2
|
|
|
|
|
|
|
|
[row_desc = Some _] when translating [Ppat_type _], [None] otherwise.
|
|
|
|
*)
|
2008-07-09 06:03:38 -07:00
|
|
|
| Tpat_lazy of pattern
|
2015-01-06 09:15:36 -08:00
|
|
|
(** lazy P *)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
and expression =
|
1995-05-04 03:15:53 -07:00
|
|
|
{ exp_desc: expression_desc;
|
|
|
|
exp_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
exp_extra: (exp_extra * Location.t * attributes) list;
|
1996-09-23 04:33:27 -07:00
|
|
|
exp_type: type_expr;
|
2013-03-25 07:16:07 -07:00
|
|
|
exp_env: Env.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
exp_attributes: attributes;
|
2013-03-25 07:16:07 -07:00
|
|
|
}
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
and exp_extra =
|
2013-04-17 05:23:44 -07:00
|
|
|
| Texp_constraint of core_type
|
2015-01-06 09:15:36 -08:00
|
|
|
(** E : T *)
|
2013-04-17 05:23:44 -07:00
|
|
|
| Texp_coerce of core_type option * core_type
|
2015-01-06 09:15:36 -08:00
|
|
|
(** E :> T [Texp_coerce (None, T)]
|
|
|
|
E : T0 :> T [Texp_coerce (Some T0, T)]
|
|
|
|
*)
|
2013-05-16 06:34:53 -07:00
|
|
|
| Texp_open of override_flag * Path.t * Longident.t loc * Env.t
|
2015-01-06 09:15:36 -08:00
|
|
|
(** let open[!] M in [Texp_open (!, P, M, env)]
|
|
|
|
where [env] is the environment after opening [P]
|
|
|
|
*)
|
2012-07-10 01:25:58 -07:00
|
|
|
| Texp_poly of core_type option
|
2015-01-06 09:15:36 -08:00
|
|
|
(** Used for method bodies. *)
|
2012-07-10 01:25:58 -07:00
|
|
|
| Texp_newtype of string
|
2015-01-06 09:15:36 -08:00
|
|
|
(** fun (type t) -> *)
|
2012-05-30 07:52:37 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
and expression_desc =
|
2012-05-30 07:52:37 -07:00
|
|
|
Texp_ident of Path.t * Longident.t loc * Types.value_description
|
2015-01-06 09:15:36 -08:00
|
|
|
(** x
|
|
|
|
M.x
|
|
|
|
*)
|
1995-05-04 03:15:53 -07:00
|
|
|
| Texp_constant of constant
|
2015-01-06 09:15:36 -08:00
|
|
|
(** 1, 'a', "true", 1.0, 1l, 1L, 1n *)
|
2013-06-03 08:14:19 -07:00
|
|
|
| Texp_let of rec_flag * value_binding list * expression
|
2015-01-06 09:15:36 -08:00
|
|
|
(** let P1 = E1 and ... and Pn = EN in E (flag = Nonrecursive)
|
|
|
|
let rec P1 = E1 and ... and Pn = EN in E (flag = Recursive)
|
|
|
|
*)
|
2014-12-22 00:45:55 -08:00
|
|
|
| Texp_function of arg_label * case list * partial
|
2015-01-06 09:15:36 -08:00
|
|
|
(** [Pexp_fun] and [Pexp_function] both translate to [Texp_function].
|
|
|
|
See {!Parsetree} for more details.
|
|
|
|
|
|
|
|
partial =
|
|
|
|
[Partial] if the pattern match is partial
|
|
|
|
[Total] otherwise.
|
|
|
|
*)
|
2015-11-24 15:37:46 -08:00
|
|
|
| Texp_apply of expression * (arg_label * expression option) list
|
2015-01-06 09:15:36 -08:00
|
|
|
(** E0 ~l1:E1 ... ~ln:En
|
|
|
|
|
|
|
|
The expression can be None if the expression is abstracted over
|
|
|
|
this argument. It currently appears when a label is applied.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
let f x ~y = x + y in
|
|
|
|
f ~y:3
|
|
|
|
|
|
|
|
The resulting typedtree for the application is:
|
|
|
|
Texp_apply (Texp_ident "f/1037",
|
|
|
|
[(Nolabel, None);
|
|
|
|
(Labelled "y", Some (Texp_constant Const_int 3))
|
|
|
|
])
|
|
|
|
*)
|
Revert GPR#305 (exception patterns under or-patterns) from trunk
This week we merged several changes from Thomas Refis, to allow the
use of exception patterns under or-patterns, to write code such as
match foo x with
| None | exception Not_found -> ...
| Some -> ...
Unfortunately, I failed to properly assess the impact of this change,
and in particular to make sure that Luc Maranget had properly reviewed
this code -- any change to the pattern-matching machinery should be
reviewed by Luc.
The problem that I had not foreseen and that he would have immediately
realized is that, while adapting the pattern-matching *compiler* is
relatively easy (Thomas inserted a transformation at the right place
to separate exception patterns from the others and handle them
separately, using the staticraise construct used by the
pattern-matching compiler to avoid duplicating the
right-hand-side branch), adapting the pattern-matching warnings
machinery is both more subtle and easier to overlook (it may fail
silently and nobody notices, unlike wrong code production). This part
of the compiler is subtle and best understood by Luc, but he does not
have the time to do a proper review of those changes in the timeframe
for the 4.03 feature freeze (mid-December).
I believe the right move in this case, implemented in the present
commit, is to revert the change from trunk (this is not a feature that
we must *imperatively* have in 4.03), do a proper job of understanding
the changes, and integrate the change when we are confident it is
ready. I hope to do this in 2016, together with Luc Maranget and
Thomas Refis -- hopefully this would allow Thomas and I to be more
confident when changing the pattern-matching machinery in the future.
Revert "Merge pull request #343 from trefis/pr7083"
This reverts commit 22681b8d2a56b308673b58fba1a06781bfc6d4b6, reversing
changes made to a24e4edf0a37d78abc1046cc453b84625b1521b5.
Revert "Merge pull request #341 from trefis/or-exception"
This reverts commit f8f68bd329375fd61e33781f61deeaeec2733f4b, reversing
changes made to 1534fe8082f6edd68be3fb960606a0e2fa87a116.
Revert "Merge pull request #305 from trefis/or-exception"
This reverts commit cfeda89396c67656d61ee24509278e50cb6e36e6, reversing
changes made to 77cf36cf82e3fb87469138c5da8f4ca9774414ff.
2015-12-12 01:52:33 -08:00
|
|
|
| Texp_match of expression * case list * case list * partial
|
2015-01-06 09:15:36 -08:00
|
|
|
(** match E0 with
|
|
|
|
| P1 -> E1
|
|
|
|
| P2 -> E2
|
Revert GPR#305 (exception patterns under or-patterns) from trunk
This week we merged several changes from Thomas Refis, to allow the
use of exception patterns under or-patterns, to write code such as
match foo x with
| None | exception Not_found -> ...
| Some -> ...
Unfortunately, I failed to properly assess the impact of this change,
and in particular to make sure that Luc Maranget had properly reviewed
this code -- any change to the pattern-matching machinery should be
reviewed by Luc.
The problem that I had not foreseen and that he would have immediately
realized is that, while adapting the pattern-matching *compiler* is
relatively easy (Thomas inserted a transformation at the right place
to separate exception patterns from the others and handle them
separately, using the staticraise construct used by the
pattern-matching compiler to avoid duplicating the
right-hand-side branch), adapting the pattern-matching warnings
machinery is both more subtle and easier to overlook (it may fail
silently and nobody notices, unlike wrong code production). This part
of the compiler is subtle and best understood by Luc, but he does not
have the time to do a proper review of those changes in the timeframe
for the 4.03 feature freeze (mid-December).
I believe the right move in this case, implemented in the present
commit, is to revert the change from trunk (this is not a feature that
we must *imperatively* have in 4.03), do a proper job of understanding
the changes, and integrate the change when we are confident it is
ready. I hope to do this in 2016, together with Luc Maranget and
Thomas Refis -- hopefully this would allow Thomas and I to be more
confident when changing the pattern-matching machinery in the future.
Revert "Merge pull request #343 from trefis/pr7083"
This reverts commit 22681b8d2a56b308673b58fba1a06781bfc6d4b6, reversing
changes made to a24e4edf0a37d78abc1046cc453b84625b1521b5.
Revert "Merge pull request #341 from trefis/or-exception"
This reverts commit f8f68bd329375fd61e33781f61deeaeec2733f4b, reversing
changes made to 1534fe8082f6edd68be3fb960606a0e2fa87a116.
Revert "Merge pull request #305 from trefis/or-exception"
This reverts commit cfeda89396c67656d61ee24509278e50cb6e36e6, reversing
changes made to 77cf36cf82e3fb87469138c5da8f4ca9774414ff.
2015-12-12 01:52:33 -08:00
|
|
|
| exception P3 -> E3
|
2015-01-06 09:15:36 -08:00
|
|
|
|
Revert GPR#305 (exception patterns under or-patterns) from trunk
This week we merged several changes from Thomas Refis, to allow the
use of exception patterns under or-patterns, to write code such as
match foo x with
| None | exception Not_found -> ...
| Some -> ...
Unfortunately, I failed to properly assess the impact of this change,
and in particular to make sure that Luc Maranget had properly reviewed
this code -- any change to the pattern-matching machinery should be
reviewed by Luc.
The problem that I had not foreseen and that he would have immediately
realized is that, while adapting the pattern-matching *compiler* is
relatively easy (Thomas inserted a transformation at the right place
to separate exception patterns from the others and handle them
separately, using the staticraise construct used by the
pattern-matching compiler to avoid duplicating the
right-hand-side branch), adapting the pattern-matching warnings
machinery is both more subtle and easier to overlook (it may fail
silently and nobody notices, unlike wrong code production). This part
of the compiler is subtle and best understood by Luc, but he does not
have the time to do a proper review of those changes in the timeframe
for the 4.03 feature freeze (mid-December).
I believe the right move in this case, implemented in the present
commit, is to revert the change from trunk (this is not a feature that
we must *imperatively* have in 4.03), do a proper job of understanding
the changes, and integrate the change when we are confident it is
ready. I hope to do this in 2016, together with Luc Maranget and
Thomas Refis -- hopefully this would allow Thomas and I to be more
confident when changing the pattern-matching machinery in the future.
Revert "Merge pull request #343 from trefis/pr7083"
This reverts commit 22681b8d2a56b308673b58fba1a06781bfc6d4b6, reversing
changes made to a24e4edf0a37d78abc1046cc453b84625b1521b5.
Revert "Merge pull request #341 from trefis/or-exception"
This reverts commit f8f68bd329375fd61e33781f61deeaeec2733f4b, reversing
changes made to 1534fe8082f6edd68be3fb960606a0e2fa87a116.
Revert "Merge pull request #305 from trefis/or-exception"
This reverts commit cfeda89396c67656d61ee24509278e50cb6e36e6, reversing
changes made to 77cf36cf82e3fb87469138c5da8f4ca9774414ff.
2015-12-12 01:52:33 -08:00
|
|
|
[Texp_match (E0, [(P1, E1); (P2, E2)], [(P3, E3)], _)]
|
2015-01-06 09:15:36 -08:00
|
|
|
*)
|
2013-04-15 09:23:22 -07:00
|
|
|
| Texp_try of expression * case list
|
2015-01-06 09:15:36 -08:00
|
|
|
(** try E with P1 -> E1 | ... | PN -> EN *)
|
1995-05-04 03:15:53 -07:00
|
|
|
| Texp_tuple of expression list
|
2015-01-06 09:15:36 -08:00
|
|
|
(** (E1, ..., EN) *)
|
2012-05-31 01:07:31 -07:00
|
|
|
| Texp_construct of
|
2013-04-17 02:46:52 -07:00
|
|
|
Longident.t loc * constructor_description * expression list
|
2015-01-06 09:15:36 -08:00
|
|
|
(** C []
|
|
|
|
C E [E]
|
|
|
|
C (E1, ..., En) [E1;...;En]
|
|
|
|
*)
|
1999-11-30 08:07:38 -08:00
|
|
|
| Texp_variant of label * expression option
|
2012-05-31 01:07:31 -07:00
|
|
|
| Texp_record of
|
2012-10-24 05:03:00 -07:00
|
|
|
(Longident.t loc * label_description * expression) list *
|
2012-05-31 01:07:31 -07:00
|
|
|
expression option
|
2012-10-24 05:03:00 -07:00
|
|
|
| Texp_field of expression * Longident.t loc * label_description
|
2012-05-31 01:07:31 -07:00
|
|
|
| Texp_setfield of
|
2012-10-24 05:03:00 -07:00
|
|
|
expression * Longident.t loc * label_description * expression
|
1995-05-04 03:15:53 -07:00
|
|
|
| Texp_array of expression list
|
|
|
|
| Texp_ifthenelse of expression * expression * expression option
|
|
|
|
| Texp_sequence of expression * expression
|
|
|
|
| Texp_while of expression * expression
|
|
|
|
| Texp_for of
|
2013-12-02 10:00:18 -08:00
|
|
|
Ident.t * Parsetree.pattern * expression * expression * direction_flag *
|
2012-05-31 01:07:31 -07:00
|
|
|
expression
|
2012-05-30 07:52:37 -07:00
|
|
|
| Texp_send of expression * meth * expression option
|
|
|
|
| Texp_new of Path.t * Longident.t loc * Types.class_declaration
|
|
|
|
| Texp_instvar of Path.t * Path.t * string loc
|
|
|
|
| Texp_setinstvar of Path.t * Path.t * string loc * expression
|
|
|
|
| Texp_override of Path.t * (Path.t * string loc * expression) list
|
|
|
|
| Texp_letmodule of Ident.t * string loc * module_expr * expression
|
2000-12-04 07:37:05 -08:00
|
|
|
| Texp_assert of expression
|
2002-01-20 09:39:10 -08:00
|
|
|
| Texp_lazy of expression
|
2012-05-30 07:52:37 -07:00
|
|
|
| Texp_object of class_structure * string list
|
2009-10-26 03:53:16 -07:00
|
|
|
| Texp_pack of module_expr
|
2015-10-15 17:13:40 -07:00
|
|
|
| Texp_unreachable
|
2015-10-30 04:37:07 -07:00
|
|
|
| Texp_extension_constructor of Longident.t loc * Path.t
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1997-05-11 14:48:21 -07:00
|
|
|
and meth =
|
|
|
|
Tmeth_name of string
|
|
|
|
| Tmeth_val of Ident.t
|
|
|
|
|
2013-04-15 09:23:22 -07:00
|
|
|
and case =
|
|
|
|
{
|
|
|
|
c_lhs: pattern;
|
|
|
|
c_guard: expression option;
|
|
|
|
c_rhs: expression;
|
|
|
|
}
|
|
|
|
|
1998-06-24 12:22:26 -07:00
|
|
|
(* Value expressions for the class language *)
|
|
|
|
|
|
|
|
and class_expr =
|
2013-04-10 10:26:55 -07:00
|
|
|
{
|
|
|
|
cl_desc: class_expr_desc;
|
|
|
|
cl_loc: Location.t;
|
|
|
|
cl_type: Types.class_type;
|
|
|
|
cl_env: Env.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
cl_attributes: attributes;
|
2013-04-10 10:26:55 -07:00
|
|
|
}
|
1998-06-24 12:22:26 -07:00
|
|
|
|
|
|
|
and class_expr_desc =
|
2012-05-30 07:52:37 -07:00
|
|
|
Tcl_ident of Path.t * Longident.t loc * core_type list
|
|
|
|
| Tcl_structure of class_structure
|
2012-05-31 01:07:31 -07:00
|
|
|
| Tcl_fun of
|
2015-09-11 04:58:31 -07:00
|
|
|
arg_label * pattern * (Ident.t * string loc * expression) list
|
|
|
|
* class_expr * partial
|
2015-11-24 15:37:46 -08:00
|
|
|
| Tcl_apply of class_expr * (arg_label * expression option) list
|
2013-06-03 08:14:19 -07:00
|
|
|
| Tcl_let of rec_flag * value_binding list *
|
2012-05-30 07:52:37 -07:00
|
|
|
(Ident.t * string loc * expression) list * class_expr
|
2012-05-31 01:07:31 -07:00
|
|
|
| Tcl_constraint of
|
|
|
|
class_expr * class_type option * string list * string list * Concr.t
|
1998-06-24 12:22:26 -07:00
|
|
|
(* Visible instance variables, methods and concretes methods *)
|
|
|
|
|
|
|
|
and class_structure =
|
2013-04-10 02:35:09 -07:00
|
|
|
{
|
|
|
|
cstr_self: pattern;
|
|
|
|
cstr_fields: class_field list;
|
|
|
|
cstr_type: Types.class_signature;
|
|
|
|
cstr_meths: Ident.t Meths.t;
|
|
|
|
}
|
1996-04-22 04:15:41 -07:00
|
|
|
|
1998-02-26 04:54:44 -08:00
|
|
|
and class_field =
|
2012-05-30 07:52:37 -07:00
|
|
|
{
|
2013-04-09 08:54:41 -07:00
|
|
|
cf_desc: class_field_desc;
|
|
|
|
cf_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
cf_attributes: attributes;
|
2012-05-30 07:52:37 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
and class_field_kind =
|
2013-04-10 04:17:41 -07:00
|
|
|
| Tcfk_virtual of core_type
|
|
|
|
| Tcfk_concrete of override_flag * expression
|
2012-05-30 07:52:37 -07:00
|
|
|
|
|
|
|
and class_field_desc =
|
2013-04-10 04:17:41 -07:00
|
|
|
Tcf_inherit of
|
2012-05-31 01:07:31 -07:00
|
|
|
override_flag * class_expr * string option * (string * Ident.t) list *
|
|
|
|
(string * Ident.t) list
|
1998-06-24 12:22:26 -07:00
|
|
|
(* Inherited instance variables and concrete methods *)
|
2013-04-10 04:17:41 -07:00
|
|
|
| Tcf_val of string loc * mutable_flag * Ident.t * class_field_kind * bool
|
|
|
|
| Tcf_method of string loc * private_flag * class_field_kind
|
|
|
|
| Tcf_constraint of core_type * core_type
|
|
|
|
| Tcf_initializer of expression
|
2014-05-04 13:42:34 -07:00
|
|
|
| Tcf_attribute of attribute
|
1996-04-22 04:15:41 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Value expressions for the module language *)
|
|
|
|
|
1998-02-26 04:54:44 -08:00
|
|
|
and module_expr =
|
1995-05-04 03:15:53 -07:00
|
|
|
{ mod_desc: module_expr_desc;
|
|
|
|
mod_loc: Location.t;
|
2012-05-30 07:52:37 -07:00
|
|
|
mod_type: Types.module_type;
|
2013-03-25 10:47:28 -07:00
|
|
|
mod_env: Env.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
mod_attributes: attributes;
|
2013-03-25 10:47:28 -07:00
|
|
|
}
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2015-01-06 09:15:36 -08:00
|
|
|
(** Annotations for [Tmod_constraint]. *)
|
2012-05-30 07:52:37 -07:00
|
|
|
and module_type_constraint =
|
2015-01-06 09:15:36 -08:00
|
|
|
| Tmodtype_implicit
|
|
|
|
(** The module type constraint has been synthesized during typecheking. *)
|
2015-09-11 04:58:31 -07:00
|
|
|
| Tmodtype_explicit of module_type
|
2015-01-06 09:15:36 -08:00
|
|
|
(** The module type was in the source file. *)
|
2012-05-30 07:52:37 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
and module_expr_desc =
|
2012-05-30 07:52:37 -07:00
|
|
|
Tmod_ident of Path.t * Longident.t loc
|
1995-05-04 03:15:53 -07:00
|
|
|
| Tmod_structure of structure
|
2013-12-16 19:52:50 -08:00
|
|
|
| Tmod_functor of Ident.t * string loc * module_type option * module_expr
|
1995-05-04 03:15:53 -07:00
|
|
|
| Tmod_apply of module_expr * module_expr * module_coercion
|
2012-05-31 01:07:31 -07:00
|
|
|
| Tmod_constraint of
|
|
|
|
module_expr * Types.module_type * module_type_constraint * module_coercion
|
2015-01-06 09:15:36 -08:00
|
|
|
(** ME (constraint = Tmodtype_implicit)
|
|
|
|
(ME : MT) (constraint = Tmodtype_explicit MT)
|
|
|
|
*)
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tmod_unpack of expression * Types.module_type
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
and structure = {
|
|
|
|
str_items : structure_item list;
|
|
|
|
str_type : Types.signature;
|
|
|
|
str_final_env : Env.t;
|
|
|
|
}
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
and structure_item =
|
2012-05-30 07:52:37 -07:00
|
|
|
{ str_desc : structure_item_desc;
|
|
|
|
str_loc : Location.t;
|
|
|
|
str_env : Env.t
|
|
|
|
}
|
|
|
|
|
|
|
|
and structure_item_desc =
|
2013-04-11 07:07:32 -07:00
|
|
|
Tstr_eval of expression * attributes
|
2013-06-03 08:14:19 -07:00
|
|
|
| Tstr_value of rec_flag * value_binding list
|
2013-03-25 11:04:40 -07:00
|
|
|
| Tstr_primitive of value_description
|
2015-03-13 04:07:29 -07:00
|
|
|
| Tstr_type of rec_flag * type_declaration list
|
2014-05-04 16:08:45 -07:00
|
|
|
| Tstr_typext of type_extension
|
|
|
|
| Tstr_exception of extension_constructor
|
2013-03-26 01:09:26 -07:00
|
|
|
| Tstr_module of module_binding
|
|
|
|
| Tstr_recmodule of module_binding list
|
2013-04-18 06:14:53 -07:00
|
|
|
| Tstr_modtype of module_type_declaration
|
2014-04-15 04:26:00 -07:00
|
|
|
| Tstr_open of open_description
|
2015-01-16 01:20:13 -08:00
|
|
|
| Tstr_class of (class_declaration * string list) list
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tstr_class_type of (Ident.t * string loc * class_type_declaration) list
|
2014-04-15 04:26:00 -07:00
|
|
|
| Tstr_include of include_declaration
|
2013-03-25 07:16:07 -07:00
|
|
|
| Tstr_attribute of attribute
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2013-03-26 01:09:26 -07:00
|
|
|
and module_binding =
|
|
|
|
{
|
|
|
|
mb_id: Ident.t;
|
|
|
|
mb_name: string loc;
|
|
|
|
mb_expr: module_expr;
|
2013-04-10 11:00:11 -07:00
|
|
|
mb_attributes: attributes;
|
2014-01-30 04:18:34 -08:00
|
|
|
mb_loc: Location.t;
|
2013-03-26 01:09:26 -07:00
|
|
|
}
|
|
|
|
|
2013-06-03 08:14:19 -07:00
|
|
|
and value_binding =
|
|
|
|
{
|
|
|
|
vb_pat: pattern;
|
|
|
|
vb_expr: expression;
|
|
|
|
vb_attributes: attributes;
|
2014-04-22 08:28:20 -07:00
|
|
|
vb_loc: Location.t;
|
2013-06-03 08:14:19 -07:00
|
|
|
}
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
and module_coercion =
|
|
|
|
Tcoerce_none
|
2013-09-30 04:35:15 -07:00
|
|
|
| Tcoerce_structure of (int * module_coercion) list *
|
|
|
|
(Ident.t * int * module_coercion) list
|
1995-05-04 03:15:53 -07:00
|
|
|
| Tcoerce_functor of module_coercion * module_coercion
|
2014-11-17 03:55:24 -08:00
|
|
|
| Tcoerce_primitive of primitive_coercion
|
2013-09-29 00:22:34 -07:00
|
|
|
| Tcoerce_alias of Path.t * module_coercion
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
and module_type =
|
|
|
|
{ mty_desc: module_type_desc;
|
|
|
|
mty_type : Types.module_type;
|
|
|
|
mty_env : Env.t;
|
2013-03-25 07:16:07 -07:00
|
|
|
mty_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
mty_attributes: attributes;
|
2013-03-25 07:16:07 -07:00
|
|
|
}
|
2012-05-30 07:52:37 -07:00
|
|
|
|
|
|
|
and module_type_desc =
|
|
|
|
Tmty_ident of Path.t * Longident.t loc
|
|
|
|
| Tmty_signature of signature
|
2013-12-16 19:52:50 -08:00
|
|
|
| Tmty_functor of Ident.t * string loc * module_type option * module_type
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tmty_with of module_type * (Path.t * Longident.t loc * with_constraint) list
|
|
|
|
| Tmty_typeof of module_expr
|
2013-09-29 00:22:34 -07:00
|
|
|
| Tmty_alias of Path.t * Longident.t loc
|
2012-05-30 07:52:37 -07:00
|
|
|
|
2014-11-17 03:55:24 -08:00
|
|
|
and primitive_coercion =
|
|
|
|
{
|
|
|
|
pc_desc: Primitive.description;
|
|
|
|
pc_type: type_expr;
|
|
|
|
pc_env: Env.t;
|
2015-04-03 09:40:24 -07:00
|
|
|
pc_loc : Location.t;
|
2014-11-17 03:55:24 -08:00
|
|
|
}
|
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
and signature = {
|
|
|
|
sig_items : signature_item list;
|
|
|
|
sig_type : Types.signature;
|
|
|
|
sig_final_env : Env.t;
|
|
|
|
}
|
|
|
|
|
|
|
|
and signature_item =
|
|
|
|
{ sig_desc: signature_item_desc;
|
|
|
|
sig_env : Env.t; (* BINANNOT ADDED *)
|
|
|
|
sig_loc: Location.t }
|
|
|
|
|
|
|
|
and signature_item_desc =
|
2013-03-25 11:04:40 -07:00
|
|
|
Tsig_value of value_description
|
2015-03-13 04:07:29 -07:00
|
|
|
| Tsig_type of rec_flag * type_declaration list
|
2014-05-04 16:08:45 -07:00
|
|
|
| Tsig_typext of type_extension
|
|
|
|
| Tsig_exception of extension_constructor
|
2013-03-25 10:47:28 -07:00
|
|
|
| Tsig_module of module_declaration
|
|
|
|
| Tsig_recmodule of module_declaration list
|
|
|
|
| Tsig_modtype of module_type_declaration
|
2014-04-15 04:26:00 -07:00
|
|
|
| Tsig_open of open_description
|
|
|
|
| Tsig_include of include_description
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tsig_class of class_description list
|
|
|
|
| Tsig_class_type of class_type_declaration list
|
2013-03-25 07:16:07 -07:00
|
|
|
| Tsig_attribute of attribute
|
2012-05-30 07:52:37 -07:00
|
|
|
|
2013-03-25 10:47:28 -07:00
|
|
|
and module_declaration =
|
|
|
|
{
|
|
|
|
md_id: Ident.t;
|
|
|
|
md_name: string loc;
|
|
|
|
md_type: module_type;
|
2013-04-10 11:00:11 -07:00
|
|
|
md_attributes: attributes;
|
2014-01-30 04:18:34 -08:00
|
|
|
md_loc: Location.t;
|
2013-03-25 10:47:28 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
and module_type_declaration =
|
|
|
|
{
|
|
|
|
mtd_id: Ident.t;
|
|
|
|
mtd_name: string loc;
|
|
|
|
mtd_type: module_type option;
|
2013-04-10 11:00:11 -07:00
|
|
|
mtd_attributes: attributes;
|
2014-01-30 04:18:34 -08:00
|
|
|
mtd_loc: Location.t;
|
2013-03-25 10:47:28 -07:00
|
|
|
}
|
2012-05-30 07:52:37 -07:00
|
|
|
|
2014-04-15 04:26:00 -07:00
|
|
|
and open_description =
|
|
|
|
{
|
|
|
|
open_path: Path.t;
|
|
|
|
open_txt: Longident.t loc;
|
|
|
|
open_override: override_flag;
|
2014-04-22 08:28:20 -07:00
|
|
|
open_loc: Location.t;
|
2014-04-15 04:26:00 -07:00
|
|
|
open_attributes: attribute list;
|
|
|
|
}
|
|
|
|
|
|
|
|
and 'a include_infos =
|
|
|
|
{
|
|
|
|
incl_mod: 'a;
|
|
|
|
incl_type: Types.signature;
|
2014-04-22 08:28:20 -07:00
|
|
|
incl_loc: Location.t;
|
2014-04-15 04:26:00 -07:00
|
|
|
incl_attributes: attribute list;
|
|
|
|
}
|
|
|
|
|
|
|
|
and include_description = module_type include_infos
|
|
|
|
|
|
|
|
and include_declaration = module_expr include_infos
|
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
and with_constraint =
|
|
|
|
Twith_type of type_declaration
|
|
|
|
| Twith_module of Path.t * Longident.t loc
|
|
|
|
| Twith_typesubst of type_declaration
|
|
|
|
| Twith_modsubst of Path.t * Longident.t loc
|
|
|
|
|
|
|
|
and core_type =
|
|
|
|
{ mutable ctyp_desc : core_type_desc;
|
2015-01-06 09:15:36 -08:00
|
|
|
(** mutable because of [Typeclass.declare_method] *)
|
2012-05-30 07:52:37 -07:00
|
|
|
mutable ctyp_type : type_expr;
|
2015-01-06 09:15:36 -08:00
|
|
|
(** mutable because of [Typeclass.declare_method] *)
|
2012-05-30 07:52:37 -07:00
|
|
|
ctyp_env : Env.t; (* BINANNOT ADDED *)
|
2013-03-25 07:16:07 -07:00
|
|
|
ctyp_loc : Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
ctyp_attributes: attributes;
|
2013-03-25 07:16:07 -07:00
|
|
|
}
|
2012-05-30 07:52:37 -07:00
|
|
|
|
|
|
|
and core_type_desc =
|
|
|
|
Ttyp_any
|
|
|
|
| Ttyp_var of string
|
2014-12-22 00:45:55 -08:00
|
|
|
| Ttyp_arrow of arg_label * core_type * core_type
|
2012-05-30 07:52:37 -07:00
|
|
|
| Ttyp_tuple of core_type list
|
|
|
|
| Ttyp_constr of Path.t * Longident.t loc * core_type list
|
2014-05-05 04:21:45 -07:00
|
|
|
| Ttyp_object of (string * attributes * core_type) list * closed_flag
|
2013-04-16 05:17:17 -07:00
|
|
|
| Ttyp_class of Path.t * Longident.t loc * core_type list
|
2012-05-30 07:52:37 -07:00
|
|
|
| Ttyp_alias of core_type * string
|
2013-04-12 09:08:52 -07:00
|
|
|
| Ttyp_variant of row_field list * closed_flag * label list option
|
2012-05-30 07:52:37 -07:00
|
|
|
| Ttyp_poly of string list * core_type
|
|
|
|
| Ttyp_package of package_type
|
|
|
|
|
|
|
|
and package_type = {
|
2014-05-04 16:08:45 -07:00
|
|
|
pack_path : Path.t;
|
2012-05-30 07:52:37 -07:00
|
|
|
pack_fields : (Longident.t loc * core_type) list;
|
|
|
|
pack_type : Types.module_type;
|
|
|
|
pack_txt : Longident.t loc;
|
|
|
|
}
|
|
|
|
|
|
|
|
and row_field =
|
2014-04-30 01:19:55 -07:00
|
|
|
Ttag of label * attributes * bool * core_type list
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tinherit of core_type
|
|
|
|
|
|
|
|
and value_description =
|
2013-03-25 11:04:40 -07:00
|
|
|
{ val_id: Ident.t;
|
|
|
|
val_name: string loc;
|
|
|
|
val_desc: core_type;
|
|
|
|
val_val: Types.value_description;
|
|
|
|
val_prim: string list;
|
|
|
|
val_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
val_attributes: attributes;
|
2012-05-30 07:52:37 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
and type_declaration =
|
2013-03-25 11:20:11 -07:00
|
|
|
{
|
|
|
|
typ_id: Ident.t;
|
|
|
|
typ_name: string loc;
|
2014-05-04 16:08:45 -07:00
|
|
|
typ_params: (core_type * variance) list;
|
2013-03-25 11:20:11 -07:00
|
|
|
typ_type: Types.type_declaration;
|
2012-05-30 07:52:37 -07:00
|
|
|
typ_cstrs: (core_type * core_type * Location.t) list;
|
|
|
|
typ_kind: type_kind;
|
|
|
|
typ_private: private_flag;
|
|
|
|
typ_manifest: core_type option;
|
2013-03-25 07:16:07 -07:00
|
|
|
typ_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
typ_attributes: attributes;
|
2013-03-25 07:16:07 -07:00
|
|
|
}
|
2012-05-30 07:52:37 -07:00
|
|
|
|
|
|
|
and type_kind =
|
|
|
|
Ttype_abstract
|
2013-03-25 07:56:56 -07:00
|
|
|
| Ttype_variant of constructor_declaration list
|
|
|
|
| Ttype_record of label_declaration list
|
2014-05-04 16:08:45 -07:00
|
|
|
| Ttype_open
|
2013-03-25 07:56:56 -07:00
|
|
|
|
|
|
|
and label_declaration =
|
|
|
|
{
|
|
|
|
ld_id: Ident.t;
|
|
|
|
ld_name: string loc;
|
|
|
|
ld_mutable: mutable_flag;
|
|
|
|
ld_type: core_type;
|
|
|
|
ld_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
ld_attributes: attributes;
|
2013-03-25 07:56:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
and constructor_declaration =
|
|
|
|
{
|
|
|
|
cd_id: Ident.t;
|
|
|
|
cd_name: string loc;
|
2014-10-14 08:51:30 -07:00
|
|
|
cd_args: constructor_arguments;
|
2013-03-25 07:56:56 -07:00
|
|
|
cd_res: core_type option;
|
|
|
|
cd_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
cd_attributes: attributes;
|
2013-03-25 07:56:56 -07:00
|
|
|
}
|
2012-05-30 07:52:37 -07:00
|
|
|
|
2014-10-14 08:51:30 -07:00
|
|
|
and constructor_arguments =
|
|
|
|
| Cstr_tuple of core_type list
|
|
|
|
| Cstr_record of label_declaration list
|
|
|
|
|
2014-05-04 16:08:45 -07:00
|
|
|
and type_extension =
|
|
|
|
{
|
|
|
|
tyext_path: Path.t;
|
|
|
|
tyext_txt: Longident.t loc;
|
|
|
|
tyext_params: (core_type * variance) list;
|
|
|
|
tyext_constructors: extension_constructor list;
|
|
|
|
tyext_private: private_flag;
|
|
|
|
tyext_attributes: attributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
and extension_constructor =
|
|
|
|
{
|
|
|
|
ext_id: Ident.t;
|
|
|
|
ext_name: string loc;
|
|
|
|
ext_type : Types.extension_constructor;
|
|
|
|
ext_kind : extension_constructor_kind;
|
|
|
|
ext_loc : Location.t;
|
|
|
|
ext_attributes: attributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
and extension_constructor_kind =
|
2014-10-14 08:51:30 -07:00
|
|
|
Text_decl of constructor_arguments * core_type option
|
2014-05-04 16:08:45 -07:00
|
|
|
| Text_rebind of Path.t * Longident.t loc
|
2014-04-15 04:26:00 -07:00
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
and class_type =
|
2013-04-10 10:44:15 -07:00
|
|
|
{
|
|
|
|
cltyp_desc: class_type_desc;
|
|
|
|
cltyp_type: Types.class_type;
|
|
|
|
cltyp_env: Env.t;
|
|
|
|
cltyp_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
cltyp_attributes: attributes;
|
2013-04-10 10:44:15 -07:00
|
|
|
}
|
2012-05-30 07:52:37 -07:00
|
|
|
|
|
|
|
and class_type_desc =
|
|
|
|
Tcty_constr of Path.t * Longident.t loc * core_type list
|
|
|
|
| Tcty_signature of class_signature
|
2014-12-22 00:45:55 -08:00
|
|
|
| Tcty_arrow of arg_label * core_type * class_type
|
2012-05-30 07:52:37 -07:00
|
|
|
|
|
|
|
and class_signature = {
|
|
|
|
csig_self : core_type;
|
|
|
|
csig_fields : class_type_field list;
|
|
|
|
csig_type : Types.class_signature;
|
|
|
|
}
|
|
|
|
|
|
|
|
and class_type_field = {
|
2013-04-10 02:17:22 -07:00
|
|
|
ctf_desc: class_type_field_desc;
|
|
|
|
ctf_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
ctf_attributes: attributes;
|
2012-05-30 07:52:37 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
and class_type_field_desc =
|
2013-04-10 04:17:41 -07:00
|
|
|
| Tctf_inherit of class_type
|
2012-05-30 07:52:37 -07:00
|
|
|
| Tctf_val of (string * mutable_flag * virtual_flag * core_type)
|
2013-04-10 04:17:41 -07:00
|
|
|
| Tctf_method of (string * private_flag * virtual_flag * core_type)
|
|
|
|
| Tctf_constraint of (core_type * core_type)
|
2014-05-04 13:42:34 -07:00
|
|
|
| Tctf_attribute of attribute
|
2012-05-30 07:52:37 -07:00
|
|
|
|
|
|
|
and class_declaration =
|
|
|
|
class_expr class_infos
|
|
|
|
|
|
|
|
and class_description =
|
|
|
|
class_type class_infos
|
|
|
|
|
|
|
|
and class_type_declaration =
|
|
|
|
class_type class_infos
|
|
|
|
|
|
|
|
and 'a class_infos =
|
|
|
|
{ ci_virt: virtual_flag;
|
2014-05-04 16:08:45 -07:00
|
|
|
ci_params: (core_type * variance) list;
|
2012-05-30 07:52:37 -07:00
|
|
|
ci_id_name : string loc;
|
|
|
|
ci_id_class: Ident.t;
|
|
|
|
ci_id_class_type : Ident.t;
|
|
|
|
ci_id_object : Ident.t;
|
|
|
|
ci_id_typesharp : Ident.t;
|
|
|
|
ci_expr: 'a;
|
|
|
|
ci_decl: Types.class_declaration;
|
|
|
|
ci_type_decl : Types.class_type_declaration;
|
2013-03-25 07:16:07 -07:00
|
|
|
ci_loc: Location.t;
|
2013-04-10 11:00:11 -07:00
|
|
|
ci_attributes: attributes;
|
2013-03-25 07:16:07 -07:00
|
|
|
}
|
2012-05-30 07:52:37 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Auxiliary functions over the a.s.t. *)
|
|
|
|
|
2012-05-31 01:07:31 -07:00
|
|
|
val iter_pattern_desc: (pattern -> unit) -> pattern_desc -> unit
|
|
|
|
val map_pattern_desc: (pattern -> pattern) -> pattern_desc -> pattern_desc
|
2003-08-11 20:11:38 -07:00
|
|
|
|
2013-06-03 08:14:19 -07:00
|
|
|
val let_bound_idents: value_binding list -> Ident.t list
|
|
|
|
val rev_let_bound_idents: value_binding list -> Ident.t list
|
2000-10-02 07:18:05 -07:00
|
|
|
|
2012-05-31 01:07:31 -07:00
|
|
|
val let_bound_idents_with_loc:
|
2013-06-03 08:14:19 -07:00
|
|
|
value_binding list -> (Ident.t * string loc) list
|
2012-05-30 07:52:37 -07:00
|
|
|
|
2015-01-06 09:15:36 -08:00
|
|
|
(** Alpha conversion of patterns *)
|
2012-05-31 01:07:31 -07:00
|
|
|
val alpha_pat: (Ident.t * Ident.t) list -> pattern -> pattern
|
2012-05-30 07:52:37 -07:00
|
|
|
|
2012-05-31 01:07:31 -07:00
|
|
|
val mknoloc: 'a -> 'a Asttypes.loc
|
|
|
|
val mkloc: 'a -> Location.t -> 'a Asttypes.loc
|
2012-05-30 07:52:37 -07:00
|
|
|
|
2015-11-24 06:43:26 -08:00
|
|
|
val pat_bound_idents: pattern -> Ident.t list
|