Skip to content

Fix belt_Set.cppo.resi #6771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jscomp/others/belt_Set.cppo.resi
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ let intersect: (t, t) => t
let diff: (t, t) => t

/**
`subset(s1, s20` tests whether the set `s1` is a subset of the set `s2`.
`subset(s1, s2)` tests whether the set `s1` is a subset of the set `s2`.
*/
let subset: (t, t) => bool

Expand Down
29 changes: 13 additions & 16 deletions jscomp/others/belt_SetInt.resi
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

/***
This module is [`Belt.Set`]() specialized with value type to be a primitive type.
It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,
and identity is not needed(using the built-in one)
This module is [`Belt.Set`]() specialized with value type to be a primitive type.
It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,
and identity is not needed(using the built-in one)

**See** [`Belt.Set`]()
**See** [`Belt.Set`]()
*/

/** The type of the set elements. */
Expand All @@ -47,14 +47,14 @@ let isEmpty: t => bool
let has: (t, value) => bool

/**
`add(s, x)` if `x` was already in `s`, `s` is returned unchanged.
`add(s, x)` If `x` was already in `s`, `s` is returned unchanged.
*/
let add: (t, value) => t

let mergeMany: (t, array<value>) => t

/**
`remove(m, x)` if `x` was not in `m`, `m` is returned reference unchanged.
`remove(m, x)` If `x` was not in `m`, `m` is returned reference unchanged.
*/
let remove: (t, value) => t

Expand All @@ -77,7 +77,7 @@ of sets.
*/
let cmp: (t, t) => int

/**
/**
`eq(s1, s2)` tests whether the sets `s1` and `s2` are equal, that is, contain
equal elements.
*/
Expand All @@ -97,15 +97,15 @@ let reduce: (t, 'a, ('a, value) => 'a) => 'a

let everyU: (t, (. value) => bool) => bool

/**
/**
`every(p, s)` checks if all elements of the set satisfy the predicate `p`. Order
unspecified.
*/
let every: (t, value => bool) => bool

let someU: (t, (. value) => bool) => bool

/**
/**
`some(p, s)` checks if at least one element of the set satisfies the predicate
`p`. Oder unspecified.
*/
Expand Down Expand Up @@ -149,13 +149,10 @@ let getUndefined: (t, value) => Js.undefined<value>
let getExn: (t, value) => value

/**
`split(x, s)` returns a triple `(l, present, r)`, where
`l` is the set of elements of `s` that are
strictly less than `x`;
`r` is the set of elements of `s` that are
strictly greater than `x`;
`present` is `false` if `s` contains no element equal to `x`,
or `true` if `s` contains an element equal to `x`.
`split(x, s)` returns a triple `(l, present, r)`, where `l` is the set of
elements of `s` that are strictly less than `x`;`r` is the set of elements of
`s` that are strictly greater than `x`; `present` is `false` if `s` contains no
element equal to `x`, or `true` if `s` contains an element equal to `x`.
*/
let split: (t, value) => ((t, t), bool)

Expand Down
42 changes: 19 additions & 23 deletions jscomp/others/belt_SetString.resi
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

/***
This module is [`Belt.Set`]() specialized with value type to be a primitive type.
It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,
and identity is not needed(using the built-in one)
This module is [`Belt.Set`]() specialized with value type to be a primitive type.
It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,
and identity is not needed(using the built-in one)

**See** [`Belt.Set`]()
**See** [`Belt.Set`]()
*/

/** The type of the set elements. */
Expand Down Expand Up @@ -71,21 +71,21 @@ let diff: (t, t) => t
*/
let subset: (t, t) => bool

/**
/**
Total ordering between sets. Can be used as the ordering function for doing sets
of sets.
*/
let cmp: (t, t) => int

/**
/**
`eq(s1, s2)` tests whether the sets `s1` and `s2` are equal, that is, contain
equal elements.
*/
let eq: (t, t) => bool

let forEachU: (t, (. value) => unit) => unit

/**
/**
`forEach(s, f)` applies `f` in turn to all elements of `s`. In increasing order
*/
let forEach: (t, value => unit) => unit
Expand All @@ -97,34 +97,33 @@ let reduce: (t, 'a, ('a, value) => 'a) => 'a

let everyU: (t, (. value) => bool) => bool

/**
`every(p, s)` checks if all elements of the set satisfy the predicate `p`.
Order unspecified.
/**
`every(p, s)` checks if all elements of the set satisfy the predicate `p`. Order
unspecified.
*/
let every: (t, value => bool) => bool

let someU: (t, (. value) => bool) => bool

/**
/**
`some(p, s)` checks if at least one element of the set satisfies the predicate
`p`. Oder unspecified.
*/
let some: (t, value => bool) => bool

let keepU: (t, (. value) => bool) => t

/**
/**
`keep(p, s)` returns the set of all elements in `s` that satisfy predicate `p`.
*/
let keep: (t, value => bool) => t

let partitionU: (t, (. value) => bool) => (t, t)

/**
`partition(p, s)` returns a pair of sets `(s1, s2)`, where
`s1` is the set of all the elements of `s` that satisfy the
predicate `p`, and `s2` is the set of all the elements of
`s` that do not satisfy `p`.
`partition(p, s)` returns a pair of sets `(s1, s2)`, where `s1` is the set of
all the elements of `s` that satisfy the predicate `p`, and `s2` is the set of
all the elements of `s` that do not satisfy `p`.
*/
let partition: (t, value => bool) => (t, t)

Expand All @@ -150,13 +149,10 @@ let getUndefined: (t, value) => Js.undefined<value>
let getExn: (t, value) => value

/**
`split(x, s)` returns a triple `(l, present, r)`, where
`l` is the set of elements of `s` that are
strictly less than `x`;
`r` is the set of elements of `s` that are
strictly greater than `x`;
`present` is `false` if `s` contains no element equal to `x`,
or `true` if `s` contains an element equal to `x`.
`split(x, s)` returns a triple `(l, present, r)`, where `l` is the set of
elements of `s` that are strictly less than `x`;`r` is the set of elements of
`s` that are strictly greater than `x`; `present` is `false` if `s` contains no
element equal to `x`, or `true` if `s` contains an element equal to `x`.
*/
let split: (t, value) => ((t, t), bool)

Expand Down
Loading