Skip to content

Commit 375b60c

Browse files
committed
fix #152
1 parent 19bffe9 commit 375b60c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

docs/property-access.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ external set_name : textarea -> string -> unit = "name" [@@bs.set]
1414
external get_name : textarea -> string = "name" [@@bs.get]
1515
```
1616

17-
```reasonml
17+
```reason
1818
type textarea;
1919
[@bs.set] external set_name: (textarea, string) => unit = "name";
2020
[@bs.get] external get_name: textarea => string = "name";
@@ -39,7 +39,7 @@ let _ =
3939
Js.log (get i32arr 0)
4040
```
4141

42-
```reasonml
42+
```reason
4343
type t;
4444
[@bs.new] external create: int => t = "Int32Array";
4545
[@bs.get_index] external get: (t, int) => int = "";

docs/return-value-wrapping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ So we introduced auto coercion for return values to gain two benefits:
1313

1414
Below is a contrived core example:
1515

16-
```reasonml
16+
```reason
1717
type element;
1818
type dom;
1919
[@bs.send] [@bs.return nullable]

website/blog/2019-05-21-ffi-overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let getSafe : int array -> int -> int = fun%raw a b -> {|
3636
3737
let v = getSafe [|1;2;3|] (-1)
3838
```
39-
```reasonml
39+
```reason
4040
let getSafe: (array(int), int) => int = [%raw
4141
(a, b) => {|
4242
if (b>=0 && b < a.length) {
@@ -99,7 +99,7 @@ let () = setDate date 3.
9999
let d = getDate date
100100
```
101101

102-
```reasonml
102+
```reason
103103
type date;
104104
105105
[@bs.new]
@@ -146,7 +146,7 @@ let () = setDate date 3.
146146
let d = getDate date
147147
```
148148

149-
```reasonml
149+
```reason
150150
type date;
151151
let fromFloat: float => date = [%raw d => {|return new Date(d)|}];
152152
let getDate: date => float = [%raw d => {|return d.getDate()|}];

website/blog/2019-06-26-release-5-0-5.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Suppose you have an OCaml module which relies on an C primitive as below:
1919
```ocaml
2020
external ff : int -> int -> int = "caml_fancy_add"
2121
```
22-
```reasonml
22+
```reason
2323
external ff : (int,int) => int = "caml_fancy_add" ;
2424
```
2525
`caml_fancy_add` is a C function for native code, now we can provide this support in a js files, what user needs to do is adding `caml_fancy_add` to a global variable like this
@@ -46,7 +46,7 @@ For example
4646
```ocaml
4747
external f : int -> int = "" [@@bs.val]
4848
```
49-
```reasonml
49+
```reason
5050
[@bs.val] external f : int => int = ""
5151
```
5252
Here the JS function name is inferred as `f` which is the same as OCaml function name.

0 commit comments

Comments
 (0)