Skip to content

Commit 23cb619

Browse files
committed
Fixes #147: a function to restore Utils.settings
1 parent 8d25f9a commit 23cb619

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arrayjit/lib/utils.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ let get_global_arg ~default ~arg_name:n =
137137
Hash_set.add accessed_global_args n;
138138
result
139139

140-
let () =
140+
let restore_settings () =
141141
settings.log_level <- Int.of_string @@ get_global_arg ~arg_name:"log_level" ~default:"0";
142142
settings.debug_log_from_routines <-
143143
Bool.of_string @@ get_global_arg ~arg_name:"debug_log_from_routines" ~default:"false";
@@ -152,6 +152,8 @@ let () =
152152
settings.print_decimals_precision <-
153153
Int.of_string @@ get_global_arg ~arg_name:"print_decimals_precision" ~default:"2"
154154

155+
let () = restore_settings ()
156+
155157
let build_file fname =
156158
let build_files_dir = "build_files" in
157159
(try assert (Stdlib.Sys.is_directory build_files_dir)

0 commit comments

Comments
 (0)