Skip to content

Commit 2d1820f

Browse files
committed
Explicitly call to raise error from tail position
1 parent 49137c5 commit 2d1820f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/picos/picos.ocaml5.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ module Computation = struct
392392
-> unit Effect.t
393393

394394
let cancel_after computation ~seconds exn bt =
395-
if not (0.0 <= seconds) then error_negative_or_nan ();
396-
Effect.perform (Cancel_after { seconds; exn; bt; computation })
395+
if not (0.0 <= seconds) then error_negative_or_nan ()
396+
else Effect.perform (Cancel_after { seconds; exn; bt; computation })
397397

398398
(* BEGIN COMPUTATION COMMON *)
399399

0 commit comments

Comments
 (0)