Skip to content

Commit

Permalink
change API for local FLS hmap
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Aug 29, 2024
1 parent 44e335e commit 328ecf4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fib/hmap_fls.real.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ let[@inline] update_local_hmap (f : Hmap.t -> Hmap.t) : unit =
FLS.set fiber k_local_hmap h

(** @raise Invalid_argument if not present *)
let get_exn (k : 'a Hmap.key) : 'a =
let get_in_local_hmap_exn (k : 'a Hmap.key) : 'a =
let h = get_local_hmap () in
Hmap.get k h

let get_opt (k : 'a Hmap.key) : 'a option =
let get_in_local_hmap_opt (k : 'a Hmap.key) : 'a option =
let h = get_local_hmap () in
Hmap.find k h

let[@inline] set (k : 'a Hmap.key) (v : 'a) : unit =
let[@inline] set_in_local_hmap (k : 'a Hmap.key) (v : 'a) : unit =
update_local_hmap (Hmap.add k v)

(**/**)
Expand Down

0 comments on commit 328ecf4

Please sign in to comment.