[sledge] Fix Context.fold_uses_of

Summary:
Context.fold_uses_of should enumerate the transitive subterms of a
term rather than only the immediate subterms.

Reviewed By: jvillard

Differential Revision: D25756553

fbshipit-source-id: a3911d9f5
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent ee177a980d
commit 7f835bf80a

@ -710,7 +710,7 @@ let fold_uses_of r t s ~f =
let rec fold_ e s ~f = let rec fold_ e s ~f =
let s = let s =
Iter.fold (Trm.trms e) s ~f:(fun sub s -> Iter.fold (Trm.trms e) s ~f:(fun sub s ->
if Trm.equal t sub then f e s else s ) fold_ ~f sub (if Trm.equal t sub then f e s else s) )
in in
if is_interpreted e then Iter.fold ~f:(fold_ ~f) (Trm.trms e) s else s if is_interpreted e then Iter.fold ~f:(fold_ ~f) (Trm.trms e) s else s
in in

Loading…
Cancel
Save