summaryrefslogtreecommitdiff
path: root/compiler/PureMicroPasses.ml
diff options
context:
space:
mode:
authorSon HO2024-04-04 16:09:48 +0200
committerGitHub2024-04-04 16:09:48 +0200
commit061d7f72bec27de46245afc82149271ca8c75627 (patch)
treeaddd12dec0c1f5a564f9204fda77301771ff5e46 /compiler/PureMicroPasses.ml
parent3909a38f3f8c58c9f97d36777c52e02617ef70b4 (diff)
parent77208249c717579d1014f27592566069b8cd0eb2 (diff)
Merge pull request #106 from AeneasVerif/escherichia/error_catching
Added Error and EError to expressions and propagated related changes
Diffstat (limited to '')
-rw-r--r--compiler/PureMicroPasses.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/PureMicroPasses.ml b/compiler/PureMicroPasses.ml
index 9fa07029..ebc5c65f 100644
--- a/compiler/PureMicroPasses.ml
+++ b/compiler/PureMicroPasses.ml
@@ -416,6 +416,7 @@ let compute_pretty_names (def : fun_decl) : fun_decl =
| StructUpdate supd -> update_struct_update supd ctx
| Lambda (lb, e) -> update_lambda lb e ctx
| Meta (meta, e) -> update_emeta meta e ctx
+ | EError (meta, msg) -> (ctx, EError (meta, msg))
in
(ctx, { e; ty })
(* *)
@@ -1006,7 +1007,8 @@ let filter_useless (_ctx : trans_ctx) (def : fun_decl) : fun_decl =
match e with
| Var _ | CVar _ | Const _ | App _ | Qualif _
| Meta (_, _)
- | StructUpdate _ | Lambda _ ->
+ | StructUpdate _ | Lambda _
+ | EError (_, _) ->
super#visit_expression env e
| Switch (scrut, switch) -> (
match switch with