Skip to content

Commit

Permalink
use Option in printing of Gc keys
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Dec 11, 2023
1 parent b89de8a commit 1439e52
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/mirage/mirage.ml
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,10 @@ let gc_control =
Fmt.(
any name
++ any " = "
++ any "(match "
++ Mirage_impl_misc.pp_key
++ any " with None -> ctrl."
++ any "Option.value ~default:ctrl."
++ any name
++ any " | Some x -> x)")
++ any " "
++ Mirage_impl_misc.pp_key)
in
let keys =
Key.
Expand All @@ -462,8 +461,8 @@ let gc_control =
in
let connect _ _ _ =
Fmt.str
"return (@.@[<v 2>let open Gc in@ let ctrl = get () in@ set ({ ctrl with \
%a;@ %a;@ %a;@ %a;@ %a;@ %a;@ %a;@ %a;@ %a;@ %a })@]@.)"
"return (@.@[<v 2>let open Gc in@ let ctrl = get () in@ set { ctrl with \
%a;@ %a;@ %a;@ %a;@ %a;@ %a;@ %a;@ %a;@ %a;@ %a }@]@.)"
(pp_pol ~name:"allocation_policy")
Key.allocation_policy
(pp_k ~name:"minor_heap_size")
Expand Down

0 comments on commit 1439e52

Please sign in to comment.