From 775fefc7ca57cee1b3b8a368ac26492dbe5a8910 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Wed, 27 Sep 2017 00:09:59 +0200 Subject: Fixing an old bug in collecting evars with cleared context. The function Proofview.undefined was collecting twice the evars that had advanced. Consequently, the functions Proofview.unshelve and Proofview.with_shelf were possibly doing the same. --- engine/proofview.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engine') diff --git a/engine/proofview.ml b/engine/proofview.ml index eef2b83f4..598358c47 100644 --- a/engine/proofview.ml +++ b/engine/proofview.ml @@ -153,8 +153,12 @@ let focus i j sp = ( { sp with comb = new_comb } , context ) (** [undefined defs l] is the list of goals in [l] which are still - unsolved (after advancing cleared goals). *) -let undefined defs l = CList.map_filter (Evarutil.advance defs) l + unsolved (after advancing cleared goals). Note that order matters. *) +let undefined defs l = + List.fold_right (fun evk l -> + match Evarutil.advance defs evk with + | Some evk -> List.add_set Evar.equal evk l + | None -> l) l [] (** Unfocuses a proofview with respect to a context. *) let unfocus c sp = -- cgit v1.2.3