src/HOL/ex/Codegenerator_Pretty.thy
author wenzelm
Tue, 23 Dec 2008 00:56:03 +0100
changeset 29152 89b0803404d7
parent 28663 bd8438543bf2
child 29933 125d513d9e39
permissions -rw-r--r--
added platform_file; added find_logics;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24195
haftmann
parents:
diff changeset
     1
(*  Title:      HOL/ex/Codegenerator_Pretty.thy
haftmann
parents:
diff changeset
     2
    ID:         $Id$
haftmann
parents:
diff changeset
     3
    Author:     Florian Haftmann, TU Muenchen
haftmann
parents:
diff changeset
     4
*)
haftmann
parents:
diff changeset
     5
haftmann
parents:
diff changeset
     6
header {* Simple examples for pretty numerals and such *}
haftmann
parents:
diff changeset
     7
haftmann
parents:
diff changeset
     8
theory Codegenerator_Pretty
25963
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
     9
imports ExecutableContent Code_Char Efficient_Nat
24195
haftmann
parents:
diff changeset
    10
begin
haftmann
parents:
diff changeset
    11
28562
4e74209f113e `code func` now just `code`
haftmann
parents: 28335
diff changeset
    12
declare isnorm.simps [code del]
28228
7ebe8dc06cbb evaluation using code generator
haftmann
parents: 26468
diff changeset
    13
25963
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    14
ML {* (*FIXME get rid of this*)
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    15
nonfix union;
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    16
nonfix inter;
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    17
nonfix upto;
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    18
*}
25933
7fc0f4065251 proper meaningful examples
haftmann
parents: 25616
diff changeset
    19
25963
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    20
export_code * in SML module_name CodegenTest
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    21
  in OCaml module_name CodegenTest file -
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    22
  in Haskell file -
25616
28d373f1482a added div/mod examples
haftmann
parents: 24530
diff changeset
    23
25963
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    24
ML {*
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    25
infix union;
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    26
infix inter;
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    27
infix 4 upto;
07e08dad8a77 distinguished examples for Efficient_Nat.thy
haftmann
parents: 25933
diff changeset
    28
*}
24195
haftmann
parents:
diff changeset
    29
haftmann
parents:
diff changeset
    30
end