Skip to content

Commit

Permalink
Explicitly call to raise error from tail position
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Oct 14, 2024
1 parent 49137c5 commit 2d1820f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/picos/picos.ocaml5.ml
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ module Computation = struct
-> unit Effect.t

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

(* BEGIN COMPUTATION COMMON *)

Expand Down

0 comments on commit 2d1820f

Please sign in to comment.