equal
deleted
inserted
replaced
79 | dest_num _ = Code_Printer.eqn_error thm "Illegal numeral expression: illegal term"; |
79 | dest_num _ = Code_Printer.eqn_error thm "Illegal numeral expression: illegal term"; |
80 in if negative then ~ (dest_num t) else dest_num t end; |
80 in if negative then ~ (dest_num t) else dest_num t end; |
81 fun pretty literals [one', bit0', bit1'] _ thm _ _ [(t, _)] = |
81 fun pretty literals [one', bit0', bit1'] _ thm _ _ [(t, _)] = |
82 (Code_Printer.str o print literals o dest_numeral one' bit0' bit1' thm) t; |
82 (Code_Printer.str o print literals o dest_numeral one' bit0' bit1' thm) t; |
83 in |
83 in |
84 thy |> Code_Target.add_const_syntax target number_of |
84 thy |> Code_Target.set_printings (Code_Symbol.Constant (number_of, |
85 (SOME (Code_Printer.complex_const_syntax (1, ([@{const_name Num.One}, |
85 [(target, SOME (Code_Printer.complex_const_syntax |
86 @{const_name Num.Bit0}, @{const_name Num.Bit1}], pretty)))) |
86 (1, ([@{const_name Num.One}, @{const_name Num.Bit0}, @{const_name Num.Bit1}], pretty))))])) |
87 end; |
87 end; |
88 |
88 |
89 end; (*local*) |
89 end; (*local*) |
90 |
90 |
91 end; |
91 end; |