src/HOL/String.thy
changeset 6395 5abd0d044adf
parent 5121 5c1f89ae8aef
child 7224 e41e64476f9b
--- a/src/HOL/String.thy	Wed Mar 17 16:53:46 1999 +0100
+++ b/src/HOL/String.thy	Wed Mar 17 17:18:54 1999 +0100
@@ -29,6 +29,9 @@
 
   (* chars *)
 
+  fun syntax_xstr x = Syntax.const "_xstr" $ Syntax.free x;
+
+
   val zero = ord "0";
   val ten = ord "A" - 10;
 
@@ -58,7 +61,7 @@
     | char_tr (*"_Char"*) ts = raise TERM ("char_tr", ts);
 
   fun char_tr' (*"Char"*) [t1, t2] =
-        Syntax.const "_Char" $ Syntax.free (Syntax.implode_xstr [dest_nibs t1 t2])
+        Syntax.const "_Char" $ syntax_xstr (Syntax.implode_xstr [dest_nibs t1 t2])
     | char_tr' (*"Char"*) _ = raise Match;
 
 
@@ -78,7 +81,7 @@
 
   fun cons_tr' (*"op #"*) [c, cs] =
         Syntax.const "_String" $
-          Syntax.free (Syntax.implode_xstr (dest_char c :: dest_string cs))
+          syntax_xstr (Syntax.implode_xstr (dest_char c :: dest_string cs))
     | cons_tr' (*"op #"*) ts = raise Match;
 
 in