merged
authorhaftmann
Thu, 12 Nov 2009 15:49:30 +0100
changeset 33634 df25bf15a248
parent 33631 d3af5b21cbaf (current diff)
parent 33633 9f7280e0c231 (diff)
child 33637 19a4fe8ecf24
merged
--- a/src/HOL/Code_Evaluation.thy	Thu Nov 12 14:47:54 2009 +0100
+++ b/src/HOL/Code_Evaluation.thy	Thu Nov 12 15:49:30 2009 +0100
@@ -145,7 +145,7 @@
   (Eval "Term.Const/ ((_), (_))" and "Term.$/ ((_), (_))")
 
 code_const "term_of \<Colon> String.literal \<Rightarrow> term"
-  (Eval "HOLogic.mk'_message'_string")
+  (Eval "HOLogic.mk'_literal")
 
 code_reserved Eval HOLogic
 
--- a/src/HOL/Datatype.thy	Thu Nov 12 14:47:54 2009 +0100
+++ b/src/HOL/Datatype.thy	Thu Nov 12 15:49:30 2009 +0100
@@ -562,6 +562,14 @@
   Sumr :: "('b => 'c) => 'a + 'b => 'c"
   "Sumr == sum_case undefined"
 
+lemma [code]:
+  "Suml f (Inl x) = f x"
+  by (simp add: Suml_def)
+
+lemma [code]:
+  "Sumr f (Inr x) = f x"
+  by (simp add: Sumr_def)
+
 lemma Suml_inject: "Suml f = Suml g ==> f = g"
   by (unfold Suml_def) (erule sum_case_inject)