summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSon Ho2023-03-07 18:04:26 +0100
committerSon HO2023-06-04 21:44:33 +0200
commit27df0acdce31c3afc6e44a7b3161cb5372cdfc60 (patch)
tree28f48838c1381ded72a2c67ba41d41e4d484d167 /compiler
parent4db56fe2c963a4052f8415b3985c8765407fccbc (diff)
Don't create useless directories in Lean
Diffstat (limited to '')
-rw-r--r--compiler/Translate.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/Translate.ml b/compiler/Translate.ml
index 3278aa6a..6bff936b 100644
--- a/compiler/Translate.ml
+++ b/compiler/Translate.ml
@@ -913,8 +913,10 @@ let translate_crate (filename : string) (dest_dir : string) (crate : A.crate) :
if !Config.backend = Lean then (
let ( ^^ ) = Filename.concat in
mkdir_if (dest_dir ^^ "Base");
- mkdir_if (dest_dir ^^ module_name);
- if needs_clauses_module then mkdir_if (dest_dir ^^ module_name ^^ "Clauses"));
+ if !Config.split_files then mkdir_if (dest_dir ^^ module_name);
+ if needs_clauses_module then (
+ assert !Config.split_files;
+ mkdir_if (dest_dir ^^ module_name ^^ "Clauses")));
(* Copy the "Primitives" file *)
let _ =