src/Pure/theory.ML
changeset 36610 bafd82950e24
parent 35988 76ca601c941e
child 39133 70d3915c92f0
equal deleted inserted replaced
36609:6ed6112f0a95 36610:bafd82950e24
   236 
   236 
   237 local
   237 local
   238 
   238 
   239 fun check_def thy unchecked overloaded (b, tm) defs =
   239 fun check_def thy unchecked overloaded (b, tm) defs =
   240   let
   240   let
   241     val ctxt = ProofContext.init thy;
   241     val ctxt = ProofContext.init_global thy;
   242     val name = Sign.full_name thy b;
   242     val name = Sign.full_name thy b;
   243     val ((lhs, rhs), _) = Primitive_Defs.dest_def ctxt Term.is_Const (K false) (K false) tm
   243     val ((lhs, rhs), _) = Primitive_Defs.dest_def ctxt Term.is_Const (K false) (K false) tm
   244       handle TERM (msg, _) => error msg;
   244       handle TERM (msg, _) => error msg;
   245     val lhs_const = Term.dest_Const (Term.head_of lhs);
   245     val lhs_const = Term.dest_Const (Term.head_of lhs);
   246     val rhs_consts = fold_aterms (fn Const const => insert (op =) const | _ => I) rhs [];
   246     val rhs_consts = fold_aterms (fn Const const => insert (op =) const | _ => I) rhs [];