blob: 382a8885c9b9066723780af4d89b0685b67c527b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
diff --git a/dune-project b/dune-project
index a7a47c5ad..ac555fbce 100644
--- a/dune-project
+++ b/dune-project
@@ -29,7 +29,7 @@
(synopsis "PPX syntax for Lwt, providing something similar to async/await from JavaScript")
(depends
(ocaml (>= 4.08))
- (ppxlib (and (>= 0.16.0) (< 0.36)))
+ (ppxlib (>= 0.36))
(ppx_let :with-test)
lwt))
diff --git a/lwt_ppx.opam b/lwt_ppx.opam
index 5823a1a41..8144359a5 100644
--- a/lwt_ppx.opam
+++ b/lwt_ppx.opam
@@ -14,7 +14,7 @@ bug-reports: "https://github.com/ocsigen/lwt/issues"
depends: [
"dune" {>= "2.7"}
"ocaml" {>= "4.08"}
- "ppxlib" {>= "0.16.0" & < "0.36"}
+ "ppxlib" {>= "0.36"}
"ppx_let" {with-test}
"lwt"
"odoc" {with-doc}
diff --git a/src/ppx/ppx_lwt.ml b/src/ppx/ppx_lwt.ml
index e77486c1a..d9973b8b8 100644
--- a/src/ppx/ppx_lwt.ml
+++ b/src/ppx/ppx_lwt.ml
@@ -144,12 +144,12 @@ let lwt_expression mapper exp attributes ext_loc =
match exns with
| [] ->
let loc = !default_loc in
- [%expr Lwt.bind [%e e] [%e pexp_function ~loc cases]]
+ [%expr Lwt.bind [%e e] [%e pexp_function_cases ~loc cases]]
| _ ->
let loc = !default_loc in
[%expr Lwt.try_bind (fun () -> [%e e])
- [%e pexp_function ~loc cases]
- [%e pexp_function ~loc exns]]
+ [%e pexp_function_cases ~loc cases]
+ [%e pexp_function_cases ~loc exns]]
in
Some (mapper#expression { new_exp with pexp_attributes })
@@ -223,7 +223,7 @@ let lwt_expression mapper exp attributes ext_loc =
Lwt.backtrace_catch
(fun exn -> try Lwt.reraise exn with exn -> exn)
(fun () -> [%e expr])
- [%e pexp_function ~loc cases]
+ [%e pexp_function_cases ~loc cases]
]
in
Some (mapper#expression { new_exp with pexp_attributes })
@@ -248,7 +248,7 @@ let lwt_expression mapper exp attributes ext_loc =
in
let new_exp =
let loc = !default_loc in
- [%expr Lwt.bind [%e cond] [%e pexp_function ~loc cases]]
+ [%expr Lwt.bind [%e cond] [%e pexp_function_cases ~loc cases]]
in
Some (mapper#expression { new_exp with pexp_attributes })
|