src/Pure/tctical.ML
changeset 19646 91c0ae7e542b
parent 19455 d828bfab05af
child 19861 620d90091788
equal deleted inserted replaced
19645:bbda28f2d379 19646:91c0ae7e542b
   484 
   484 
   485 local
   485 local
   486 
   486 
   487 fun print_vars_terms thy (n,thm) =
   487 fun print_vars_terms thy (n,thm) =
   488   let
   488   let
       
   489     fun typed ty = " has type: " ^ Sign.string_of_typ thy ty;
   489     fun find_vars thy (Const (c, ty)) =
   490     fun find_vars thy (Const (c, ty)) =
   490         (case Term.typ_tvars ty
   491         (case Term.typ_tvars ty
   491          of [] => I
   492          of [] => I
   492           | _ => insert (op =) (c ^ " has type: " ^ (Sign.string_of_typ thy ty)))
   493           | _ => insert (op =) (c ^ typed ty))
   493       | find_vars thy (t as Var _) =
   494       | find_vars thy (Var (xi, ty)) = insert (op =) (Term.string_of_vname xi ^ typed ty)
   494           insert (op =) ("Var " ^ (Term.str_of_term t))
       
   495       | find_vars _ (Free _) = I
   495       | find_vars _ (Free _) = I
   496       | find_vars _ (Bound _) = I
   496       | find_vars _ (Bound _) = I
   497       | find_vars thy (Abs (_, _, t)) = find_vars thy t
   497       | find_vars thy (Abs (_, _, t)) = find_vars thy t
   498       | find_vars thy (t1 $ t2) = 
   498       | find_vars thy (t1 $ t2) = 
   499           find_vars thy t1 #> find_vars thy t1;
   499           find_vars thy t1 #> find_vars thy t1;