summaryrefslogtreecommitdiff
path: root/compiler/FunsAnalysis.ml
diff options
context:
space:
mode:
authorEscherichia2024-03-28 17:14:27 +0100
committerEscherichia2024-03-28 17:18:35 +0100
commit64666edb3c10cd42e15937ac4038b83def630e35 (patch)
tree50ee0423de5424a43b6d670901ae005cadabadc7 /compiler/FunsAnalysis.ml
parentca25347592dd48b014cb318be9b3e34a6f2ba5e3 (diff)
formatting
Diffstat (limited to 'compiler/FunsAnalysis.ml')
-rw-r--r--compiler/FunsAnalysis.ml11
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/FunsAnalysis.ml b/compiler/FunsAnalysis.ml
index 9ca35e79..f85f9d1e 100644
--- a/compiler/FunsAnalysis.ml
+++ b/compiler/FunsAnalysis.ml
@@ -167,8 +167,15 @@ let analyze_module (m : crate) (funs_map : fun_decl FunDeclId.Map.t)
(* We need to know if the declaration group contains a global - note that
* groups containing globals contain exactly one declaration *)
let is_global_decl_body = List.exists (fun f -> f.is_global_decl_body) d in
- cassert ((not is_global_decl_body) || List.length d = 1) (List.hd d).meta "This global definition is in a group of mutually recursive definitions";
- cassert ((not !group_has_builtin_info) || List.length d = 1) (List.hd d).meta "This builtin function belongs to a group of mutually recursive definitions";
+ cassert
+ ((not is_global_decl_body) || List.length d = 1)
+ (List.hd d).meta
+ "This global definition is in a group of mutually recursive definitions";
+ cassert
+ ((not !group_has_builtin_info) || List.length d = 1)
+ (List.hd d).meta
+ "This builtin function belongs to a group of mutually recursive \
+ definitions";
(* We ignore on purpose functions that cannot fail and consider they *can*
* fail: the result of the analysis is not used yet to adjust the translation
* so that the functions which syntactically can't fail don't use an error monad.