@@ -6,7 +6,7 @@ theory Z_Machine
66 and "over" "init" "invariant" "operations" "until" "params" "output" "pre" "update" "\<in>" "promote" "emit" "extends"
77begin
88
9- expr_vars
9+ declare [[ literal_variables = false ]]
1010
1111named_theorems z_machine_defs
1212
@@ -120,7 +120,9 @@ text \<open> Function to show the channel of an operation \<close>
120120
121121definition show_op_channel :: "String.literal \<Rightarrow> 'a::show \<Rightarrow> String.literal" where
122122"show_op_channel c p = c + STR '' '' + show p"
123-
123+
124+ ML \<open>open YXML\<close>
125+
124126ML_file \<open>Z_Machine.ML\<close>
125127
126128ML \<open>
@@ -139,7 +141,7 @@ code_datatype pfun_of_alist pfun_of_map pfun_entries
139141
140142setup \<open> Explorer_Lib.switch_to_quotes \<close>
141143
142- lit_vars
144+ declare [[ literal_variables ]]
143145
144146text \<open> Change the default target of string syntax to be literals. Literals are much better for
145147 code generation, and also provide more control since they are a distinct type to lists.
@@ -150,10 +152,10 @@ bundle literal_syntax
150152begin
151153
152154no_syntax
153- "_String" :: "str_position \<Rightarrow> string" ( "_" )
155+ "_String" :: "str_position \<Rightarrow> string" ( \<open>(\<open>open_block notation=\<open>literal string\<close> \<close>_ ) \<close> )
154156
155157syntax
156- "_Literal" :: "str_position \<Rightarrow> String.literal" ( "_" )
158+ "_Literal" :: "str_position \<Rightarrow> String.literal" ( \<open>(\<open>open_block notation=\<open>literal string\<close> \<close>_ ) \<close> )
157159
158160end
159161
@@ -226,6 +228,6 @@ code_printing
226228| constant "show_set_inst.show_set" \<rightharpoonup> ( Haskell ) "Prelude.show"
227229| class_instance "set" :: "show" \<rightharpoonup> ( Haskell ) -
228230
229- code_reserved Haskell List_Set
231+ code_reserved ( Haskell ) List_Set
230232
231233end
0 commit comments