Skip to content

Commit

Permalink
Fixed documentation comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dlesbre committed Apr 30, 2024
1 parent 4806ca9 commit b63d36b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ dune build @doc
positive integer of both positive and negative keys are present; and not the smallest negative, as one might expect.
- Supports generic maps and sets: a `'m map` that maps `'k key` to `('k, 'm) value`.
This is especially useful when using [GADTs](https://v2.ocaml.org/manual/gadts-tutorial.html) for the type of keys. This is also sometimes called a dependent map.
- Allows easy and fast operations across different types of maps and set (e.g.
an intersection between a map and a set), since all sets and maps, no matter their key type, are really integer sets or maps.
- Allows easy and fast operations across different types of maps and set
which have the same type of keys (e.g. an intersection between a map and a set).
- Multiple choices for internal representation (`NODE`), which allows for efficient
storage (no need to store a value for sets), or using weak nodes only (values removed from the tree if no other pointer to it exists). This system can also
be extended to store size information in nodes if needed.
Expand Down
5 changes: 2 additions & 3 deletions index.mld
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ dune build @doc
{li Supports generic maps and sets: a ['m map] that maps ['k key] to [('k, 'm) value].
This is especially useful when using {{: https://v2.ocaml.org/manual/gadts-tutorial.html}GADTs}
for the type of keys. This is also sometimes called a dependent map.}
{li Allows easy and fast operations across different types of maps and set (e.g.
an intersection between a map and a set), since all sets and maps, no matter their key type,
are really integer sets or maps.}
{li Allows easy and fast operations across different types of maps and set
which have the same type of keys (e.g. an intersection between a map and a set).}
{li Multiple choices for internal representation ({!PatriciaTree.NODE}), which allows for efficient
storage (no need to store a value for sets), or using weak nodes only (values removed from the tree if no other pointer to it exists). This system can also
be extended to store size information in nodes if needed.}
Expand Down
8 changes: 4 additions & 4 deletions patriciaTree.mli
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ module type HETEROGENEOUS_MAP = sig

include BASE_MAP

(** Operation with maps/set of different types *)
(** Operation with maps/set of different types.
[Map2] must use the same [Key.to_int] function. *)
module WithForeign(Map2:BASE_MAP with type 'a key = 'a key):sig
type ('map1,'map2) polyinter_foreign = { f: 'a. 'a key -> ('a,'map1) value -> ('a,'map2) Map2.value -> ('a,'map1) value } [@@unboxed]

Expand Down Expand Up @@ -1048,9 +1049,8 @@ module type MAP = sig

val disjoint : 'a t -> 'a t -> bool

(* Maybe: WithForeign and WithForeignHeterogeneous. *)

(** Combination with other kinds of maps. *)
(** Combination with other kinds of maps.
[Map2] must use the same [Key.to_int] function. *)
module WithForeign(Map2 : BASE_MAP with type _ key = key):sig

type ('b,'c) polyfilter_map_foreign = { f: 'a. key -> ('a,'b) Map2.value -> 'c option } [@@unboxed]
Expand Down

0 comments on commit b63d36b

Please sign in to comment.