Skip to content
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

docs: remove warnings, part 1 #701

Merged
merged 2 commits into from
Nov 25, 2023
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
4 changes: 2 additions & 2 deletions jscomp/core/lam.mli
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ val false_ : t
val unit : t

val sequor : t -> t -> t
(** convert [l || r] to [if l then true else r]*)
(** convert [l || r] to [if l then true else r] *)

val sequand : t -> t -> t
(** convert [l && r] to [if l then r else false *)
(** convert [l && r] to [if l then r else false] *)

val not_ : Location.t -> t -> t
(** constant folding *)
Expand Down
4 changes: 2 additions & 2 deletions jscomp/melstd/hash_set.mli
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)

(** Ideas are based on {!Hash},
however, {!Hash.add} does not really optimize and has a bad semantics for {!Hash_set},
(** Ideas are based on [Hash],
however, [Hash.add] does not really optimize and has a bad semantics for [Hash_set],
This module fixes the semantics of [add].
[remove] is not optimized since it is not used too much
*)
Expand Down
4 changes: 2 additions & 2 deletions jscomp/others/belt_Id.mli
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type ('key, 'id) comparable =
Unlike normal functions, when created, it comes with a unique identity (guaranteed
by the type system).

It can be created using function {!comparableU} or{!comparable}.
It can be created using function {!comparableU} or {!val-comparable}.

The idea of a unique identity when created is that it makes sure two sets would type
mismatch if they use different comparison function
Expand Down Expand Up @@ -117,7 +117,7 @@ type ('key, 'id) hashable =
Unlike normal functions, when created, it comes with a unique identity (guaranteed
by the type system).

It can be created using function {!hashableU} or {!hashable}.
It can be created using function {!hashableU} or {!val-hashable}.

The idea of a unique identity when created is that it makes sure two hash sets would type
mismatch if they use different comparison function
Expand Down
4 changes: 2 additions & 2 deletions jscomp/others/belt_Range.mli
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ val everyByU : int -> int -> step:int -> ((int -> bool)[@u]) -> bool
val everyBy : int -> int -> step:int -> (int -> bool) -> bool
(** [everyBy start finish ~step p]

{b See} {!Belt_Array.rangeBy}
{b See} {!Belt.Array.rangeBy}

equivalent to [Belt.Array.(every (rangeBy start finish ~step) p)]
*)
Expand All @@ -65,7 +65,7 @@ val someByU : int -> int -> step:int -> ((int -> bool)[@u]) -> bool
val someBy : int -> int -> step:int -> (int -> bool) -> bool
(** [someBy start finish ~step p]

{b See} {!Belt_Array.rangeBy}
{b See} {!Belt.Array.rangeBy}

equivalent to [Belt.Array.(some (rangeBy start finish ~step) p)]
*)
2 changes: 1 addition & 1 deletion jscomp/others/belt_Set.cppo.mli
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* 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,
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)

{b See} {!Belt.Set}
Expand Down
8 changes: 4 additions & 4 deletions jscomp/others/sort.cppo.mli
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)


(** This is a specialized module for {!Belt_SortArray}, the docs in that module also
(** This is a specialized module for {!Belt.SortArray}, the docs in that module also
applies here, except the comparator is fixed and inlined
*)

Expand All @@ -38,7 +38,7 @@ type element = string

val strictlySortedLength: element array -> int
(**
The same as {!Belt_SortArray.strictlySortedLength } except the comparator is fixed
The same as {!Belt.SortArray.strictlySortedLength } except the comparator is fixed
@return [+n] means increasing order [-n] means negative order
*)

Expand All @@ -48,11 +48,11 @@ val isSorted: element array -> bool

val stableSortInPlace: element array -> unit
(**
The same as {!Belt_SortArray.stableSortInPlaceBy} except the comparator is fixed
The same as {!Belt.SortArray.stableSortInPlaceBy} except the comparator is fixed
*)

val stableSort: element array -> element array
(** The same as {!Belt_SortArray.stableSortBy} except the comparator is fixed *)
(** The same as {!Belt.SortArray.stableSortBy} except the comparator is fixed *)

val binarySearch: element array -> element -> int
(**
Expand Down
2 changes: 1 addition & 1 deletion jscomp/runtime/js.ml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module Null = Js_null
(** Provide utilities around ['a null] *)

module Undefined = Js_undefined
(** Provide utilities around {!undefined} *)
(** Provide utilities around {!type-undefined} *)

module Nullable = Js_nullable
(** Provide utilities around {!null_undefined} *)
Expand Down
2 changes: 1 addition & 1 deletion jscomp/runtime/js_internal.ml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ external nullToOption : 'a null -> 'a option = "#null_to_opt"
external isNullable : 'a nullable -> bool = "#is_nullable"

external testAny : 'a -> bool = "#is_nullable"
(** The same as {!test} except that it is more permissive on the types of input *)
(** The same as {!isNullable} except that it is more permissive on the types of input *)

external null : 'a null = "#null"
(** The same as [empty] in {!Js.Null} will be compiled as [null]*)
Expand Down
1 change: 1 addition & 0 deletions jscomp/runtime/js_json.mli
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ let getIds s =
(* prints `1, 2, 3` *)
let _ =
Js.log (getIds {| { "ids" : [1, 2, 3] } |})
]}

@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse> MDN
*)
Expand Down
3 changes: 0 additions & 3 deletions jscomp/runtime/js_promise.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@

(** Specialized bindings to Promise. Note: For simplicity,
this binding does not track the error type, it treat it as an opaque type
{[

]}
*)

type +'a t
Expand Down
8 changes: 2 additions & 6 deletions jscomp/runtime/js_re.ml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,9 @@ and subsequent uses will ocntinue the search from the previous {! lastIndex}.
let maybeMatches = "banana" |> Js.String.match_ [\[%re "/na+/g"\]]
]}

@see
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp>
JavaScript API reference on MDN
@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp> JavaScript API reference on MDN

@see
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions>
JavaScript Regular Expressions Guide on MDN
@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions> JavaScript Regular Expressions Guide on MDN
*)

type t
Expand Down
2 changes: 0 additions & 2 deletions jscomp/runtime/js_string.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ external fromCodePoint : int -> t = "String.fromCodePoint"
fromCodePoint 0xd55c = {js|한|js};;
fromCodePoint 0x1f63a = {js|😺|js};;
]}

*)

external fromCodePointMany : int array -> t = "String.fromCodePoint"
Expand All @@ -87,7 +86,6 @@ external length : t -> int = "length"
{[
length "abcd" = 4;;
]}

*)

external get : t -> int -> t = ""
Expand Down
2 changes: 1 addition & 1 deletion jscomp/runtime/js_undefined.mli
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ external return : 'a -> 'a t = "%identity"

val testAny : 'a -> bool
(**
@since 1.6.1
Returns [true] if the given value is [empty] ([undefined])
@since 1.6.1
*)

external empty : 'a t = "#undefined"
Expand Down
Loading
Loading