24195
|
1 |
(* Title: HOL/ex/Codegenerator_Pretty.thy
|
|
2 |
ID: $Id$
|
|
3 |
Author: Florian Haftmann, TU Muenchen
|
|
4 |
*)
|
|
5 |
|
|
6 |
header {* Simple examples for pretty numerals and such *}
|
|
7 |
|
|
8 |
theory Codegenerator_Pretty
|
25963
|
9 |
imports ExecutableContent Code_Char Efficient_Nat
|
24195
|
10 |
begin
|
|
11 |
|
28228
|
12 |
declare isnorm.simps [code func del]
|
|
13 |
|
|
14 |
lemma [code func, code func del]:
|
|
15 |
"(Code_Eval.term_of :: char \<Rightarrow> term) = Code_Eval.term_of" ..
|
25933
|
16 |
|
25963
|
17 |
declare char.recs [code func del]
|
|
18 |
char.cases [code func del]
|
25933
|
19 |
|
25963
|
20 |
ML {* (*FIXME get rid of this*)
|
|
21 |
nonfix union;
|
|
22 |
nonfix inter;
|
|
23 |
nonfix upto;
|
|
24 |
*}
|
25933
|
25 |
|
25963
|
26 |
export_code * in SML module_name CodegenTest
|
|
27 |
in OCaml module_name CodegenTest file -
|
|
28 |
in Haskell file -
|
25616
|
29 |
|
25963
|
30 |
ML {*
|
|
31 |
infix union;
|
|
32 |
infix inter;
|
|
33 |
infix 4 upto;
|
|
34 |
*}
|
24195
|
35 |
|
|
36 |
end
|