summaryrefslogtreecommitdiff
path: root/compiler/PureMicroPasses.ml
diff options
context:
space:
mode:
authorEscherichia2024-03-29 14:07:36 +0100
committerEscherichia2024-03-29 14:07:36 +0100
commit8f969634f3f192a9282a21a1ca2a1b6a676984ca (patch)
treee1a3a46d7ccc50b887ad6795c8bb37cf81ed270a /compiler/PureMicroPasses.ml
parent521c7380de5f11bfb190bdccd933ab6c1d0d6ca5 (diff)
formatting and changed save_error condition for failing from b to not b
Diffstat (limited to 'compiler/PureMicroPasses.ml')
-rw-r--r--compiler/PureMicroPasses.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/PureMicroPasses.ml b/compiler/PureMicroPasses.ml
index 95c74a7b..91ee16dc 100644
--- a/compiler/PureMicroPasses.ml
+++ b/compiler/PureMicroPasses.ml
@@ -222,7 +222,9 @@ let compute_pretty_names (def : fun_decl) : fun_decl =
(* Register a variable for constraints propagation - used when an variable is
* introduced (left-hand side of a left binding) *)
let register_var (ctx : pn_ctx) (v : var) : pn_ctx =
- sanity_check __FILE__ __LINE__ (not (VarId.Map.mem v.id ctx.pure_vars)) def.meta;
+ sanity_check __FILE__ __LINE__
+ (not (VarId.Map.mem v.id ctx.pure_vars))
+ def.meta;
match v.basename with
| None -> ctx
| Some name ->
@@ -1198,7 +1200,8 @@ let simplify_aggregates (ctx : trans_ctx) (def : fun_decl) : fun_decl =
in
let fields =
match adt_decl.kind with
- | Enum _ | Opaque -> craise __FILE__ __LINE__ def.meta "Unreachable"
+ | Enum _ | Opaque ->
+ craise __FILE__ __LINE__ def.meta "Unreachable"
| Struct fields -> fields
in
let num_fields = List.length fields in