summaryrefslogtreecommitdiff
path: root/compiler/PureMicroPasses.ml
diff options
context:
space:
mode:
authorSon Ho2024-04-11 19:40:08 +0200
committerSon Ho2024-04-11 19:40:08 +0200
commit86c3680b1f3f50b4c4e6198eebc145cadfff3876 (patch)
treec79ea2c4a35198d9011287db4767599b0c5c1c42 /compiler/PureMicroPasses.ml
parent9c1773530a7056c161e69471b36eaa3603f6ed26 (diff)
parent4fb9c9f655a9ffc3b4a1a717988311c057c9c599 (diff)
Merge remote-tracking branch 'origin/main' into son/clean
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 b1c85d61..004ecfef 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