equal
deleted
inserted
replaced
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); |