0.2.1 • Published 6 years ago

reason_async v0.2.1

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

Async/await for Reason/OCaml!

Clone the example repo to get started quickly.

Example usage

With promises

let doSomething = () => {
  let module Let_syntax = Reason_async.Promise;
  [%await let x = somethingPromisy
  and y = anotherPromise];
  /* ... */
  [%awaitWrap let z = getFileContents()];
  x + y + z
};

Installation / setup

NOTE: You currently need to be using bsb-native in your project in order for weird bugs not to happen on recompilation. You'll want "bs-platform": "git+https://github.com/bsansouci/bsb-native" in your package.json.

  • yarn add reason_async (or npm)
  • add reason_async to your bs-dependencies in bsconfig.json
  • add reason_async to your ppx-flags in bsconfig.json

Example bsconfig.json:

{
  "name": "myapp",
  "refmt": 3,
  "sources": "./src",
  "bs-dependencies": ["reason_async"],
  "ppx-flags": ["reason_async"]
}
0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago