Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Jun 3, 2023
1 parent 02b0af4 commit c10e959
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/dune_rules/resolve.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,10 @@ let push_frames { stack_frames; exn = _ } =
in
loop stack_frames

let error_to_memo { stack_frames; exn } =
let error_to_memo error =
let open Memo.O in
let rec loop = function
| [] ->
let+ () = Memo.return () in
raise exn
| x :: rest ->
Memo.push_stack_frame
~human_readable_description:(fun () -> Lazy.force x)
(fun () -> loop rest)
in
loop stack_frames
let* () = push_frames error in
raise error.exn

let read_memo = function
| Ok x -> Memo.return x
Expand Down

0 comments on commit c10e959

Please sign in to comment.