Skip to content

Commit d40201b

Browse files
edwinansmlasson
andauthored
Improve README (#41)
* Clarify let[@landmark] * Update README.md * Update README.md --------- Co-authored-by: Marc Lasson <marc.lasson@lexifi.com>
1 parent 2498e10 commit d40201b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ tail-recursive calls (and also prevents some polymorphism generalization).
196196
To get around these problems, it is recommended to use the other provided
197197
extension around `let ... in` and `let rec ... in`:
198198
```ocaml
199-
let[@landmark] f = body
199+
let[@landmark] f x1 ... xk = body
200200
```
201201
which is expanded in :
202202
```ocaml
203203
let __generated_landmark_2 = Landmark.register "f"
204-
let f = body
204+
let f x1 ... xk = body
205205
let f x1 ... xn =
206206
Landmark.enter __generated_landmark_2;
207207
let r =
@@ -211,7 +211,7 @@ let f x1 ... xn =
211211
r
212212
```
213213
when the arity `n` of `f` is obtained by counting the shallow occurrences
214-
of `fun ... ->` and `function ... -> ` in `body`. Please note that when using
214+
of `fun ... ->` and `function ... -> ` in `body` in addition to explicit parameters (`f x1 ... xk`). Please note that when using
215215
this annotation with let-rec bindings, only entry-point calls will be recorded.
216216
For instance, in the following piece of code
217217
```ocaml

0 commit comments

Comments
 (0)