dealing with ml_string and char instances
authorhaftmann
Fri, 05 Jan 2007 14:31:46 +0100
changeset 22017 9b1656a28c88
parent 22016 e086b4e846b8
child 22018 b00adaa1ef99
dealing with ml_string and char instances
src/HOL/ex/CodeEval.thy
--- a/src/HOL/ex/CodeEval.thy	Fri Jan 05 14:31:45 2007 +0100
+++ b/src/HOL/ex/CodeEval.thy	Fri Jan 05 14:31:46 2007 +0100
@@ -109,6 +109,19 @@
 in DatatypeCodegen.add_codetypes_hook_bootstrap hook end
 *}
 
+text {* Disable for characters and ml_strings *}
+
+code_const "typ_of \<Colon> char itself \<Rightarrow> typ" and "term_of \<Colon> char \<Rightarrow> term"
+  (SML "!((_); raise Fail \"typ'_of'_char\")"
+    and "!((_); raise Fail \"term'_of'_char\")")
+  (OCaml "!((_); failwith \"typ'_of'_char\")"
+    and "!((_); failwith \"term'_of'_char\")")
+  (Haskell "error/ \"typ'_of'_char\""
+    and "error/ \"term'_of'_char\"")
+
+code_const "term_of \<Colon> ml_string \<Rightarrow> term"
+  (SML "!((_); raise Fail \"term'_of'_ml'_string\")")
+  (OCaml "!((_); failwith \"term'_of'_ml'_string\")")
 
 subsection {* Evaluation infrastructure *}