summaryrefslogtreecommitdiff
path: root/src/rewriter.mli
diff options
context:
space:
mode:
authorThomas Bauereiss2017-08-10 17:42:27 +0100
committerThomas Bauereiss2017-08-10 17:51:48 +0100
commite4fce3ffd02b69e36b42ffe3c868570c45aef986 (patch)
tree2f00e0c1bae4ef56eef4865ab4529425557e9086 /src/rewriter.mli
parentaf1803ece80f4e278d2ff996bf9430a6a8551164 (diff)
Add support for early return to Lem backend
Implemented using the exception monad, by throwing and catching the return value
Diffstat (limited to 'src/rewriter.mli')
-rw-r--r--src/rewriter.mli7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rewriter.mli b/src/rewriter.mli
index 9c91b55b..9dbdee3d 100644
--- a/src/rewriter.mli
+++ b/src/rewriter.mli
@@ -154,3 +154,10 @@ val fold_exp : ('a,'exp,'exp_aux,'lexp,'lexp_aux,'fexp,'fexp_aux,'fexps,'fexps_a
'pat,'pat_aux,'fpat,'fpat_aux) exp_alg -> 'a exp -> 'exp
val id_pat_alg : ('a,'a pat, 'a pat_aux, 'a fpat, 'a fpat_aux) pat_alg
+
+val compute_exp_alg : 'b -> ('b -> 'b -> 'b) ->
+ ('a,('b * 'a exp),('b * 'a exp_aux),('b * 'a lexp),('b * 'a lexp_aux),('b * 'a fexp),
+ ('b * 'a fexp_aux),('b * 'a fexps),('b * 'a fexps_aux),
+ ('b * 'a opt_default_aux),('b * 'a opt_default),('b * 'a pexp),('b * 'a pexp_aux),
+ ('b * 'a letbind_aux),('b * 'a letbind),
+ ('b * 'a pat),('b * 'a pat_aux),('b * 'a fpat),('b * 'a fpat_aux)) exp_alg