Skip to content

Commit a51e799

Browse files
authored
Restored belt Ok and Error constructors (#6514)
* Restored belt Ok and Error constructors * Add PR URL to changelog
1 parent beafae4 commit a51e799

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
1313
# 11.0.0-rc.8 (Unreleased)
1414

15+
#### :bug: Bug Fix
16+
17+
- Fix accidental removal of `Belt.Result.Ok` and `Belt.Result.Error` constructors in rc.5 https://github.com/rescript-lang/rescript-compiler/pull/6514
18+
1519
# 11.0.0-rc.7
1620

1721
#### :rocket: New Feature

jscomp/others/belt_Result.res

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2424

25-
type t<'a, 'b> = result<'a, 'b>
25+
type t<'a, 'b> = result<'a, 'b> =
26+
| Ok('a)
27+
| Error('b)
2628

2729
let getExn = x =>
2830
switch x {

jscomp/others/belt_Result.resi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
This module gives you useful utilities to create and combine `Result` data.
3030
*/
3131

32-
type t<'a, 'b> = result<'a, 'b>
32+
type t<'a, 'b> = result<'a, 'b> =
33+
| Ok('a)
34+
| Error('b)
3335

3436
/**
3537
`getExn(res)`: when `res` is `Ok(n)`, returns `n` when `res` is `Error(m)`, raise an exception

0 commit comments

Comments
 (0)