Skip to content

Commit

Permalink
Fix warning 53
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Lemerre committed May 21, 2024
1 parent 0e01de4 commit 50c8447
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions patriciaTree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ module MakeCustomHeterogeneousSet

(* Note: as add is simpler, without any insertion function needed,
maybe it is worth reimplementing it. *)
let [@specialised] add key map = BaseMap.add key () map
let [@specialise] add key map = BaseMap.add key () map
let singleton elt = singleton elt ()
let is_singleton set = match BaseMap.is_singleton set with
| None -> None
Expand All @@ -1722,13 +1722,13 @@ module MakeCustomHeterogeneousSet
(* Likewise with union and inter: we do not have to worry about
reconciling the values here, so we could reimplement if the
compiler is not smart enough. *)
let [@specialised] union =
let union =
let f:(unit,unit,unit) BaseMap.polyunion = {f=fun _ () () -> ()} in
fun sa sb -> BaseMap.idempotent_union f sa sb
fun [@specialise] sa sb -> BaseMap.idempotent_union f sa sb

let [@specialised] inter =
let inter =
let f:(unit,unit,unit) BaseMap.polyinter = {f=fun _ () () -> ()} in
fun sa sb -> (BaseMap.idempotent_inter (* [@specialised] *)) f sa sb
fun [@specialise] sa sb -> (BaseMap.idempotent_inter (* [@specialised] *)) f sa sb

type polyiter = { f: 'a. 'a elt -> unit; } [@@unboxed]
let iter f set = BaseMap.iter {f=fun k () -> f.f k} set
Expand Down

0 comments on commit 50c8447

Please sign in to comment.