diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bbb28a09bc..f0bbbfc1cc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ - Fix integer range patterns, including nested record and exception patterns, incorrectly matching values below the range. https://github.com/rescript-lang/rescript/pull/8714 +#### :nail_care: Polish + +- Deprecate `Stdlib_Error` and `Stdlib_Exn` modules in favor of `JsError/JsExn`. https://github.com/rescript-lang/rescript/pull/8404 +- Deprecate `List.has` in favor of `List.some`. https://github.com/rescript-lang/rescript/pull/8807 + # 12.3.1 #### :bug: Bug fix diff --git a/packages/@rescript/runtime/Stdlib_Error.resi b/packages/@rescript/runtime/Stdlib_Error.resi index 3abc756f860..86327ba7130 100644 --- a/packages/@rescript/runtime/Stdlib_Error.resi +++ b/packages/@rescript/runtime/Stdlib_Error.resi @@ -3,6 +3,7 @@ Functions for working with JavaScript exceptions. See [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) on MDN. */ +@@deprecated("Use `JsError` module") /** Represents a JavaScript exception. */ @deprecated({ diff --git a/packages/@rescript/runtime/Stdlib_Exn.resi b/packages/@rescript/runtime/Stdlib_Exn.resi index 5435507bc7b..e82347c6911 100644 --- a/packages/@rescript/runtime/Stdlib_Exn.resi +++ b/packages/@rescript/runtime/Stdlib_Exn.resi @@ -7,6 +7,7 @@ /*** Provide utilities for dealing with JS exceptions. */ +@@deprecated("Use `JsExn` module") /** Represents a JS exception */ @deprecated({ diff --git a/packages/@rescript/runtime/Stdlib_List.resi b/packages/@rescript/runtime/Stdlib_List.resi index bd150d8269b..09e85ed11b0 100644 --- a/packages/@rescript/runtime/Stdlib_List.resi +++ b/packages/@rescript/runtime/Stdlib_List.resi @@ -759,6 +759,8 @@ let equal: (list<'a>, list<'a>, ('a, 'a) => bool) => bool `has(list, element, f)` returns `true` if the list contains at least one `element` for which `f` returns \`true'. +Use [`some`](#some) with a predicate instead. + ## Examples ```rescript @@ -769,6 +771,7 @@ list{1, 2, 3}->List.has(4, (a, b) => a == b) == false list{-1, -2, -3}->List.has(2, (a, b) => abs(a) == abs(b)) == true ``` */ +@deprecated("Use `some` instead") let has: (list<'a>, 'b, ('a, 'b) => bool) => bool /**