src/HOL/Tools/functor.ML
changeset 63568 e63c8f2fbd28
parent 63120 629a4c5e953e
child 67149 e61557884799
equal deleted inserted replaced
63567:41037360dcb7 63568:e63c8f2fbd28
   188     val _ =
   188     val _ =
   189       if null (Term.add_vars (singleton
   189       if null (Term.add_vars (singleton
   190         (Variable.export_terms (Variable.auto_fixes input_mapper ctxt) ctxt) input_mapper) [])
   190         (Variable.export_terms (Variable.auto_fixes input_mapper ctxt) ctxt) input_mapper) [])
   191       then ()
   191       then ()
   192       else error ("Illegal locally free variable(s) in term: "
   192       else error ("Illegal locally free variable(s) in term: "
   193         ^ Syntax.string_of_term ctxt input_mapper);;
   193         ^ Syntax.string_of_term ctxt input_mapper);
   194     val mapper = singleton (Variable.polymorphic ctxt) input_mapper;
   194     val mapper = singleton (Variable.polymorphic ctxt) input_mapper;
   195     val _ =
   195     val _ =
   196       if null (Term.add_tfreesT (fastype_of mapper) []) then ()
   196       if null (Term.add_tfreesT (fastype_of mapper) []) then ()
   197       else error ("Illegal locally fixed type variable(s) in type: " ^ Syntax.string_of_typ ctxt T);
   197       else error ("Illegal locally fixed type variable(s) in type: " ^ Syntax.string_of_typ ctxt T);
   198     fun add_tycos (Type (tyco, Ts)) = insert (op =) tyco #> fold add_tycos Ts
   198     fun add_tycos (Type (tyco, Ts)) = insert (op =) tyco #> fold add_tycos Ts