Skip to content

Commit

Permalink
docs: remove warnings, part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Aug 25, 2023
1 parent 539bfc0 commit 26a5337
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 69 deletions.
4 changes: 2 additions & 2 deletions jscomp/common/lam.mli
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,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
2 changes: 1 addition & 1 deletion jscomp/ext/ext_array.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. *)

val reverse_range : 'a array -> int -> int -> unit
(** Some utilities for {!Array} operations *)
(** Some utilities for array operations *)

val reverse_of_list : 'a list -> 'a array
val to_list_f : 'a array -> ('a -> 'b) -> 'b list
Expand Down
4 changes: 2 additions & 2 deletions jscomp/ext/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 @@ -61,7 +61,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_null_undefined
(** 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 @@ -111,7 +111,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
6 changes: 3 additions & 3 deletions jscomp/runtime/js_string.ml
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ external split : t -> t array = "split"
split "," "a,b,,c" = [|"a"; "b"; ""; "c"|];;
split "::" "good::bad as great::awful" = [|"good"; "bad as great"; "awful"|];;
split ";" "has-no-delimiter" = [|"has-no-delimiter"|];;
]};
]}
*)

external splitAtMost : t -> limit:int -> t array = "split"
Expand Down Expand Up @@ -530,7 +530,7 @@ external splitByRe : Js_re.t -> t option array = "split"
splitByRe [%re "/\\s*[,;]\\s*/"] "art; bed , cog ;dad" = [|Some "art"; Some "bed"; Some "cog"; Some "dad"|];;
splitByRe [%re "/[,;]/"] "has:no:match" = [|Some "has:no:match"|];;
splitByRe [%re "/(#)(:)?/"] "a#b#:c" = [|Some "a"; Some "#"; None; Some "b"; Some "#"; Some ":"; Some "c"|];;
]};
]}
*)

external splitByReAtMost : Js_re.t -> limit:int -> t option array = "split"
Expand All @@ -544,7 +544,7 @@ external splitByReAtMost : Js_re.t -> limit:int -> t option array = "split"
splitByReAtMost [%re "/\\s*:\\s*/"] ~limit: 0 "one: two: three: four" = [| |];;
splitByReAtMost [%re "/\\s*:\\s*/"] ~limit: 8 "one: two: three: four" = [|Some "one"; Some "two"; Some "three"; Some "four"|];;
splitByReAtMost [%re "/(#)(:)?/"] ~limit:3 "a#b#:c" = [|Some "a"; Some "#"; None|];;
]};
]}
*)

external splitRegexpLimited : Js_re.t -> int -> t array = "split"
Expand Down
6 changes: 3 additions & 3 deletions jscomp/runtime/js_string2.ml
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ external split : t -> t -> t array = "split"
split "a,b,,c" "," = [|"a"; "b"; ""; "c"|];;
split "good::bad as great::awful" "::" = [|"good"; "bad as great"; "awful"|];;
split "has-no-delimiter" ";" = [|"has-no-delimiter"|];;
]};
]}
*)

external splitAtMost : t -> t -> limit:int -> t array = "split"
Expand All @@ -523,7 +523,7 @@ external splitByRe : t -> Js_re.t -> t option array = "split"
{[
splitByRe "art; bed , cog ;dad" [%re "/\\s*[,;]\\s*/"] = [|"art"; "bed"; "cog"; "dad"|];;
splitByRe "has:no:match" [%re "/[,;]/"] = [|"has:no:match"|];;
]};
]}
*)

external splitByReAtMost : t -> Js_re.t -> limit:int -> t option array = "split"
Expand All @@ -536,7 +536,7 @@ external splitByReAtMost : t -> Js_re.t -> limit:int -> t option array = "split"
splitByReAtMost "one: two: three: four" [%re "/\\s*:\\s*/"] ~limit: 3 = [|"one"; "two"; "three"|];;
splitByReAtMost "one: two: three: four" [%re "/\\s*:\\s*/"] ~limit: 0 = [| |];;
splitByReAtMost "one: two: three: four" [%re "/\\s*:\\s*/"] ~limit: 8 = [|"one"; "two"; "three"; "four"|];;
]};
]}
*)

external startsWith : t -> t -> bool = "startsWith"
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 @@ -38,8 +38,8 @@ val test : 'a t -> bool

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

0 comments on commit 26a5337

Please sign in to comment.