on master help sign in
Only undefine things once, even if they're referenced multiple times
commitc79fb21cf949987dca50452cda1a8d8fed0b1cd2 authorAlyssa Carter <trillionalyssa@gmail.com> dateTue 5 Aug 2014, 16:32 (12 years ago) parent10a5bd6
1 file changed+2−2
src/Idris/REPL.hs+2−2
src/Idris/REPL.hs+2−2
@@ -788,11 +788,11 @@ process fn (Undefine names) = undefine names
788788 do replDefs <- idris_repl_defs `fmap` get
789789 callGraph <- whoCalls n
790790 let users = case lookup n callGraph of
791− Just ns -> ns
791+ Just ns -> nub ns
792792 Nothing -> fail ("Tried to undefine nonexistent name" ++ show n)
793793 undefinedJustNow <- concat `fmap` mapM undefClosure users
794794 undefOne n
795− return (n : undefinedJustNow)
795+ return (nub (n : undefinedJustNow))
796796
797797
798798