Skip to content

Commit

Permalink
Merge pull request #8 from evgenykochetkov/bump-bs-platform
Browse files Browse the repository at this point in the history
Bump bs-platform, fix deprecations
  • Loading branch information
jonlaing authored Aug 1, 2018
2 parents e627b91 + 7d41e0a commit aed0073
Show file tree
Hide file tree
Showing 8 changed files with 1,163 additions and 423 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ In the OCaml/ReasonML standard library, many of the common List operations throw
- nth
- etc

### Monadic Options and Js.Results
### Monadic Options and Belt.Results

Rationale includes monadic and functor operations ala Haskell for the `option` and `Js.Result` types.
Rationale includes monadic and functor operations ala Haskell for the `option` and `Belt.Result` types.

```Reason
open Rationale.Option.Infix;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Option_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test(
test(
"ofResult",
() =>
expect((ofResult(Js.Result.Ok(true)), ofResult(Js.Result.Error(false))))
expect((ofResult(Belt.Result.Ok(true)), ofResult(Belt.Result.Error(false))))
|> toEqual((Some(true), None))
);

Expand Down
2 changes: 1 addition & 1 deletion bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
],
"bs-dev-dependencies": [
"bs-jest"
"@glennsl/bs-jest"
],
"namespace": true,
"refmt": 3
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
],
"license": "MIT",
"devDependencies": {
"bs-platform": "2.0.0",
"bs-jest": "^0.2.0"
"bs-platform": "^4.0.2",
"@glennsl/bs-jest": "^0.4.2"
},
"dependencies": {}
"dependencies": {},
"jest": {
"testEnvironment": "node"
}
}
2 changes: 1 addition & 1 deletion src/Option.re
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let default = (d, o) =>
};

let ofResult = (r) =>
Js.Result.(
Belt.Result.(
switch r {
| Ok(a) => Some(a)
| Error(_) => None
Expand Down
2 changes: 1 addition & 1 deletion src/Option.rei
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let isSome: option('a) => bool;

let default: ('a, option('a)) => 'a;

let ofResult: Js.Result.t('a, 'b) => option('a);
let ofResult: Belt.Result.t('a, 'b) => option('a);

let toExn: (string, option('a)) => 'a;

Expand Down
4 changes: 2 additions & 2 deletions src/Result.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Js.Result;
open Belt.Result;

let fail = (err) => Error(err);

Expand Down Expand Up @@ -53,7 +53,7 @@ let bimap = (okF, errF, r) =>
include
Monad.MakeBasic2(
{
type t('a, 'd) = Js.Result.t('a, 'd);
type t('a, 'd) = Belt.Result.t('a, 'd);
let bind = (r, f) =>
switch r {
| Ok(a) => f(a)
Expand Down
Loading

0 comments on commit aed0073

Please sign in to comment.