src/Pure/sign.ML
changeset 47008 8b13ebf3eda4
parent 47006 5ee8004e2151
child 52143 36ffe23b25f8
equal deleted inserted replaced
47007:0dacedb4a948 47008:8b13ebf3eda4
   418 end;
   418 end;
   419 
   419 
   420 
   420 
   421 (* abbreviations *)
   421 (* abbreviations *)
   422 
   422 
   423 fun add_abbrev mode (b, raw_t) thy =
   423 fun add_abbrev mode (b, raw_t) thy =  (* FIXME proper ctxt (?) *)
   424   let
   424   let
   425     val ctxt = Syntax.init_pretty_global thy;
   425     val ctxt = Syntax.init_pretty_global thy;
   426     val prep_tm = no_frees ctxt o Term.no_dummy_patterns o cert_term_abbrev thy;
   426     val prep_tm = no_frees ctxt o Term.no_dummy_patterns o cert_term_abbrev thy;
   427     val t = (prep_tm raw_t handle TYPE (msg, _, _) => error msg | TERM (msg, _) => error msg)
   427     val t = (prep_tm raw_t handle TYPE (msg, _, _) => error msg | TERM (msg, _) => error msg)
   428       handle ERROR msg => cat_error msg ("in constant abbreviation " ^ Binding.print b);
   428       handle ERROR msg => cat_error msg ("in constant abbreviation " ^ Binding.print b);