From e03d65a4be0a3e1ab462f784be02e9400d6b69a6 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Tue, 26 May 2026 10:32:29 -0300 Subject: [PATCH 1/3] Deprecate `Stdlib_Error` and `Stdlib_Exn` modules in favor of JsError/JsExn (#8404) * Deprecate `Stdlib_Error` and `Stdlib_Exn` modules in favor of `JsError`/`JsExn` * Update CHANGELOG.md (cherry picked from commit 8aaa1e84072be7b2cd47569f5826d47a09d36f77) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1 Signed-off-by: Christoph Knittel --- CHANGELOG.md | 4 ++++ packages/@rescript/runtime/Stdlib_Error.resi | 1 + packages/@rescript/runtime/Stdlib_Exn.resi | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bbb28a09bc..f937d80ec1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ - 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 + # 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({ From a668736f907e07d3f861e6391ef5a896ab4eb31b Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Mon, 12 Oct 2026 07:08:06 +0000 Subject: [PATCH 2/3] Deprecate List.has in favor of List.some Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1 Signed-off-by: Christoph Knittel --- packages/@rescript/runtime/Stdlib_List.resi | 3 +++ 1 file changed, 3 insertions(+) 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 /** From 8d84b5949ec9a435bb7419476f50f57f2a01e899 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Mon, 12 Oct 2026 07:18:13 +0000 Subject: [PATCH 3/3] Add CHANGELOG entry Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1 Signed-off-by: Christoph Knittel --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f937d80ec1a..f0bbbfc1cc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ #### :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