let solve_target name rs = match self_first 0 [] [] rs with | Good res -> Resource.Cache.resume_resource res; res | Bad (Failed backtrace) -> raise (Failed (Target (name, backtrace))) | Bad exn -> raise exn