From 27df0acdce31c3afc6e44a7b3161cb5372cdfc60 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Tue, 7 Mar 2023 18:04:26 +0100 Subject: Don't create useless directories in Lean --- compiler/Translate.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler') 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 _ = -- cgit v1.2.3