[sledge] Avoid matching on Not_found

Summary: base 0.13 breaks it (sometimes).

Reviewed By: jvillard

Differential Revision: D18717807

fbshipit-source-id: e27a4d6da
master
Josh Berdine 5 years ago committed by Facebook Github Bot
parent e201e517c9
commit 48fd99d48f

@ -395,7 +395,7 @@ module Var = struct
Map.fold sub ~init:Set.empty ~f:(fun ~key:_ ~data range ->
Set.add range data )
let apply sub v = try Map.find_exn sub v with Caml.Not_found -> v
let apply sub v = Map.find sub v |> Option.value ~default:v
let apply_set sub vs =
Map.fold sub ~init:vs ~f:(fun ~key ~data vs ->

@ -107,7 +107,7 @@ let invariant r =
let true_ = {sat= true; rep= empty_map} |> check invariant
(** apply a subst to a term *)
let apply s a = try Map.find_exn s a with Caml.Not_found -> a
let apply s a = Map.find s a |> Option.value ~default:a
(** apply a subst to maximal non-interpreted subterms *)
let rec norm s a =

Loading…
Cancel
Save