equal
deleted
inserted
replaced
285 parse_translation {* |
285 parse_translation {* |
286 let |
286 let |
287 fun numeral_tr [(c as Const (@{syntax_const "_constrain"}, _)) $ t $ u] = |
287 fun numeral_tr [(c as Const (@{syntax_const "_constrain"}, _)) $ t $ u] = |
288 c $ numeral_tr [t] $ u |
288 c $ numeral_tr [t] $ u |
289 | numeral_tr [Const (num, _)] = |
289 | numeral_tr [Const (num, _)] = |
290 (Numeral.mk_number_syntax o #value o Lexicon.read_xnum) num |
290 (Numeral.mk_number_syntax o #value o Lexicon.read_num) num |
291 | numeral_tr ts = raise TERM ("numeral_tr", ts); |
291 | numeral_tr ts = raise TERM ("numeral_tr", ts); |
292 in [(@{syntax_const "_Numeral"}, K numeral_tr)] end |
292 in [(@{syntax_const "_Numeral"}, K numeral_tr)] end |
293 *} |
293 *} |
294 |
294 |
295 typed_print_translation {* |
295 typed_print_translation {* |