File tree 7 files changed +78
-55
lines changed 7 files changed +78
-55
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -8,18 +8,16 @@ let () =
8
8
try_with
9
9
(fun () ->
10
10
Js_of_ocaml.Effect_js. assume_no_perform (fun () ->
11
- try_with
12
- (fun () -> () )
13
- ()
14
- { effc = (fun (type a ) (_ : a Effect.t ) -> None ) };
15
- );
16
- perform Dummy
17
- )
11
+ try_with (fun () -> () ) () { effc = (fun (type a ) (_ : a Effect.t ) -> None ) });
12
+ perform Dummy )
18
13
()
19
14
{ effc =
20
15
(fun (type a ) (e : a Effect.t ) ->
21
16
match e with
22
17
| Dummy ->
23
- Some (fun (k : (a, _) continuation ) -> print_endline " ok" ; continue k () )
18
+ Some
19
+ (fun (k : (a, _) continuation ) ->
20
+ print_endline " ok" ;
21
+ continue k () )
24
22
| _ -> None )
25
23
}
Original file line number Diff line number Diff line change @@ -8,10 +8,8 @@ let must_raise () =
8
8
try_with
9
9
(fun () ->
10
10
Js_of_ocaml.Effect_js. assume_no_perform (fun () ->
11
- (* Should raise [Effect.Unhandled] despite the installed handler *)
12
- perform Dummy
13
- )
14
- )
11
+ (* Should raise [Effect.Unhandled] despite the installed handler *)
12
+ perform Dummy ))
15
13
()
16
14
{ effc =
17
15
(fun (type a ) (e : a Effect.t ) ->
@@ -22,5 +20,7 @@ let must_raise () =
22
20
23
21
let () =
24
22
try
25
- must_raise () ; print_endline " failed" ; exit 2
23
+ must_raise () ;
24
+ print_endline " failed" ;
25
+ exit 2
26
26
with Effect. Unhandled Dummy -> print_endline " ok"
Original file line number Diff line number Diff line change
1
+ (env
2
+ (with-effects
3
+ (flags
4
+ (:standard -w -38))
5
+ (js_of_ocaml
6
+ (flags
7
+ (:standard --effects=double-translation))
8
+ ;; separate compilation doesn't yet work when using
9
+ ;; '--effect=double-translation' since Dune doesn't know it should compile a
10
+ ;; different version of the dependencies.
11
+ ;; TODO: remove once support in ocaml/dune#11222 is released.
12
+ (compilation_mode whole_program)))
13
+ (_
14
+ (flags
15
+ (:standard -w -38))
16
+ (js_of_ocaml
17
+ (flags
18
+ (:standard --effects=double-translation))
19
+ ;; separate compilation doesn't yet work when using
20
+ ;; '--effect=double-translation' since Dune doesn't know it should compile a
21
+ ;; different version of the dependencies.
22
+ ;; TODO: remove once support in ocaml/dune#11222 is released.
23
+ (compilation_mode whole_program))))
24
+
25
+ (copy_files# ../*.ml)
26
+
27
+ (tests
28
+ (build_if
29
+ (>= %{ocaml_version} 5))
30
+ (names
31
+ assume_no_perform
32
+ assume_no_perform_unhandled
33
+ assume_no_perform_nested_handler)
34
+ (libraries js_of_ocaml)
35
+ (action
36
+ (ignore-outputs
37
+ (with-accepted-exit-codes
38
+ 0
39
+ (run node %{test}))))
40
+ (modes js))
Original file line number Diff line number Diff line change 10
10
(>= %{ocaml_version} 5))
11
11
(inline_tests
12
12
(modes js wasm best))
13
+ (modules
14
+ (:standard
15
+ \
16
+ assume_no_perform
17
+ assume_no_perform_unhandled
18
+ assume_no_perform_nested_handler))
13
19
(preprocess
14
20
(pps ppx_expect)))
21
+
22
+ (tests
23
+ (build_if
24
+ (>= %{ocaml_version} 5))
25
+ (names
26
+ assume_no_perform
27
+ assume_no_perform_unhandled
28
+ assume_no_perform_nested_handler)
29
+ (modules
30
+ assume_no_perform
31
+ assume_no_perform_unhandled
32
+ assume_no_perform_nested_handler)
33
+ (libraries js_of_ocaml)
34
+ (action
35
+ (ignore-outputs
36
+ (with-accepted-exit-codes
37
+ 0
38
+ (run node %{test}))))
39
+ (modes js wasm))
Original file line number Diff line number Diff line change 52
52
test_lazy
53
53
used_cont)
54
54
(modules
55
- (:standard
56
- \
57
- unhandled_unlinked
58
- assume_no_perform
59
- assume_no_perform_unhandled
60
- assume_no_perform_nested_handler))
55
+ (:standard \ unhandled_unlinked))
61
56
(modes js))
62
57
63
58
(tests
72
67
(run node %{test}))
73
68
(run cat)))
74
69
(modes js))
75
-
76
- (tests
77
- (build_if
78
- (>= %{ocaml_version} 5))
79
- (names
80
- assume_no_perform
81
- assume_no_perform_unhandled
82
- assume_no_perform_nested_handler)
83
- (libraries js_of_ocaml)
84
- (action
85
- (ignore-outputs
86
- (with-accepted-exit-codes
87
- 0
88
- (run node %{test}))))
89
- (modes js))
Original file line number Diff line number Diff line change 34
34
test_lazy
35
35
used_cont)
36
36
(modules
37
- (:standard
38
- \
39
- unhandled_unlinked
40
- assume_no_perform
41
- assume_no_perform_unhandled
42
- assume_no_perform_nested_handler))
37
+ (:standard \ unhandled_unlinked))
43
38
(modes js wasm))
44
39
45
40
(tests
54
49
(run node %{test}))
55
50
(run cat)))
56
51
(modes js wasm))
57
-
58
- (tests
59
- (build_if
60
- (>= %{ocaml_version} 5))
61
- (names
62
- assume_no_perform
63
- assume_no_perform_unhandled
64
- assume_no_perform_nested_handler)
65
- (libraries js_of_ocaml)
66
- (action
67
- (ignore-outputs
68
- (with-accepted-exit-codes
69
- 0
70
- (run node %{test}))))
71
- (modes js wasm))
You can’t perform that action at this time.
0 commit comments