diff options
| author | Brian Campbell | 2017-12-05 11:31:02 +0000 |
|---|---|---|
| committer | Brian Campbell | 2017-12-06 17:36:59 +0000 |
| commit | c497bef0d49ec32afae584c63a0cee0730cb90b1 (patch) | |
| tree | 864a5c115090a4a810956303a843e5ce633d3493 /src/ast_util.mli | |
| parent | 17c518d94e5b2f531de47ee94ca0ceca09051f25 (diff) | |
Add top-level pattern match guards internally
Also fix bug in mono analysis with generated variables
Breaks lots of typechecking tests because it generates unnecessary
equality tests on units (and the tests don't have generic equality),
which I'll fix next.
Diffstat (limited to 'src/ast_util.mli')
| -rw-r--r-- | src/ast_util.mli | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ast_util.mli b/src/ast_util.mli index cbf7deec..a45ca4e9 100644 --- a/src/ast_util.mli +++ b/src/ast_util.mli @@ -153,6 +153,7 @@ val quant_split : typquant -> kinded_id list * n_constraint list (* Functions to map over the annotations in sub-expressions *) val map_exp_annot : ('a annot -> 'b annot) -> 'a exp -> 'b exp val map_pat_annot : ('a annot -> 'b annot) -> 'a pat -> 'b pat +val map_pexp_annot : ('a annot -> 'b annot) -> 'a pexp -> 'b pexp val map_lexp_annot : ('a annot -> 'b annot) -> 'a lexp -> 'b lexp val map_letbind_annot : ('a annot -> 'b annot) -> 'a letbind -> 'b letbind @@ -271,3 +272,6 @@ val tyvars_of_nexp : nexp -> KidSet.t val tyvars_of_typ : typ -> KidSet.t val undefined_of_typ : bool -> Ast.l -> (typ -> 'annot) -> typ -> 'annot exp + +val destruct_pexp : 'a pexp -> 'a pat * ('a exp) option * 'a exp * (Ast.l * 'a) +val construct_pexp : 'a pat * ('a exp) option * 'a exp * (Ast.l * 'a) -> 'a pexp |
