use fold_aterms directly;
authorwenzelm
Wed, 31 Dec 2008 18:53:18 +0100
changeset 29274 84e1729dda9c
parent 29273 285c00993bc2
child 29275 9fa69e3858d6
use fold_aterms directly;
src/Pure/Isar/find_theorems.ML
--- a/src/Pure/Isar/find_theorems.ML	Wed Dec 31 18:53:18 2008 +0100
+++ b/src/Pure/Isar/find_theorems.ML	Wed Dec 31 18:53:18 2008 +0100
@@ -176,9 +176,9 @@
 
 (* filter_pattern *)
 
-fun get_names (_, thm) = let
-    val t = Thm.full_prop_of thm;
-  in (term_consts t) union (add_term_free_names (t, [])) end;
+fun get_names (_, thm) =
+  fold_aterms (fn Const (c, _) => insert (op =) c | Free (x, _) => insert (op =) x | _ => I)
+    (Thm.full_prop_of thm) [];
 
 fun add_pat_names (t, cs) =
       case strip_comb t of