Skip to content

Commit

Permalink
Closing dump model output channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevendeo committed Sep 26, 2023
1 parent b42df84 commit 9677995
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib/util/options.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ module Output = struct
let diagnostic_output = ref Stderr
let dump_models_output = ref Stderr

let all_channels = [
regular_output;
diagnostic_output;
dump_models_output;
]

let close o =
match o with
| Stdout | Stderr | Fmt _ ->
Expand All @@ -77,9 +83,7 @@ module Output = struct
close !output;
output := o

let close_all () =
set_output regular_output Invalid;
set_output diagnostic_output Invalid
let close_all () = List.iter (fun o -> set_output o Invalid) all_channels

let set_regular o = set_output regular_output o
let set_diagnostic o = set_output diagnostic_output o
Expand Down

0 comments on commit 9677995

Please sign in to comment.