diff --git a/CHANGELOG.md b/CHANGELOG.md index 101f76518a..5a6468049e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ # 11.0.0-rc.8 (Unreleased) +#### :bug: Bug Fix + +- Fix accidental removal of `Belt.Result.Ok` and `Belt.Result.Error` constructors in rc.5 https://github.com/rescript-lang/rescript-compiler/pull/6514 + # 11.0.0-rc.7 #### :rocket: New Feature diff --git a/jscomp/others/belt_Result.res b/jscomp/others/belt_Result.res index 607ad01fd6..a1cbba1459 100644 --- a/jscomp/others/belt_Result.res +++ b/jscomp/others/belt_Result.res @@ -22,7 +22,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -type t<'a, 'b> = result<'a, 'b> +type t<'a, 'b> = result<'a, 'b> = + | Ok('a) + | Error('b) let getExn = x => switch x { diff --git a/jscomp/others/belt_Result.resi b/jscomp/others/belt_Result.resi index c88d5c736f..4e47d11c66 100644 --- a/jscomp/others/belt_Result.resi +++ b/jscomp/others/belt_Result.resi @@ -29,7 +29,9 @@ This module gives you useful utilities to create and combine `Result` data. */ -type t<'a, 'b> = result<'a, 'b> +type t<'a, 'b> = result<'a, 'b> = + | Ok('a) + | Error('b) /** `getExn(res)`: when `res` is `Ok(n)`, returns `n` when `res` is `Error(m)`, raise an exception