Skip to content

0.3.0

Latest
Compare
Choose a tag to compare
@hannesm hannesm released this 20 Apr 22:36
· 10 commits to main since this release

CHANGES:

  • S.union and S.merge could invalidate the invariant:
    foreach k \in m . m[k] = (key, value) /\ k = key
    which could lead to assertion fail in find
  • The signatures uses semi-explicit polymorphism with a record type:
    • S.equal : { f : 'a key -> 'a -> 'a -> bool } -> t -> t -> bool
    • S.merge : { f : 'a key -> 'a option -> 'a option -> 'a option } -> t -> t -> t
    • S.union : { f : 'a key -> 'a -> 'a -> 'a option } -> t -> t -> t
    • new function S.map : { f : 'a key -> 'a -> 'a } -> t -> t
  • Interface duplication for "bindings" and "value" were removed:
    S.findb, S.getb, S.addb, S.addb_unless_bound no longer exist,
    use S.find, S.get, S.add, S.add_unless_bound instead.
  • The pretty-printer S.pp was removed, and K.pp is no longer required! S.pp is:
    let pp ppf = M.iter (fun (M.B (k, v)) -> Fmt.pf ppf (K.pp k) v)
  • no more Fmt dependency
  • added some initial tests