doc-src/IsarAdvanced/Codegen/Thy/examples/arbitrary.ML
author blanchet
Tue, 17 Feb 2009 14:01:54 +0100
changeset 29956 62f931b257b7
parent 23850 f1434532a562
permissions -rw-r--r--
Reintroduce set_interpreter for Collect and op :. I removed them by accident when removing old code that dealt with the "set" type. Incidentally, there is still some broken "set" code in Refute that should be fixed (see TODO in refute.ML).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21190
08ec81dfc7fb (continued)
haftmann
parents:
diff changeset
     1
structure Codegen = 
08ec81dfc7fb (continued)
haftmann
parents:
diff changeset
     2
struct
08ec81dfc7fb (continued)
haftmann
parents:
diff changeset
     3
08ec81dfc7fb (continued)
haftmann
parents:
diff changeset
     4
val arbitrary_option : 'a option = NONE;
08ec81dfc7fb (continued)
haftmann
parents:
diff changeset
     5
21994
dfa5133dbe73 updated manual
haftmann
parents: 21993
diff changeset
     6
fun dummy_option [] = arbitrary_option
dfa5133dbe73 updated manual
haftmann
parents: 21993
diff changeset
     7
  | dummy_option (x :: xs) = SOME x;
21190
08ec81dfc7fb (continued)
haftmann
parents:
diff changeset
     8
08ec81dfc7fb (continued)
haftmann
parents:
diff changeset
     9
end; (*struct Codegen*)