equal
deleted
inserted
replaced
68 export_code %quote empty dequeue enqueue in SML |
68 export_code %quote empty dequeue enqueue in SML |
69 module_name Example file "examples/example.ML" |
69 module_name Example file "examples/example.ML" |
70 |
70 |
71 text {* \noindent resulting in the following code: *} |
71 text {* \noindent resulting in the following code: *} |
72 |
72 |
73 text %quote {* |
73 text %quote %typewriter {* |
74 \begin{typewriter} |
74 @{code_stmts empty enqueue dequeue (SML)} |
75 @{code_stmts empty enqueue dequeue (SML)} |
|
76 \end{typewriter} |
|
77 *} |
75 *} |
78 |
76 |
79 text {* |
77 text {* |
80 \noindent The @{command_def export_code} command takes a |
78 \noindent The @{command_def export_code} command takes a |
81 space-separated list of constants for which code shall be generated; |
79 space-separated list of constants for which code shall be generated; |
93 |
91 |
94 text {* |
92 text {* |
95 \noindent This is the corresponding code: |
93 \noindent This is the corresponding code: |
96 *} |
94 *} |
97 |
95 |
98 text %quote {* |
96 text %quote %typewriter {* |
99 \begin{typewriter} |
97 @{code_stmts empty enqueue dequeue (Haskell)} |
100 @{code_stmts empty enqueue dequeue (Haskell)} |
|
101 \end{typewriter} |
|
102 *} |
98 *} |
103 |
99 |
104 text {* |
100 text {* |
105 \noindent For more details about @{command export_code} see |
101 \noindent For more details about @{command export_code} see |
106 \secref{sec:further}. |
102 \secref{sec:further}. |
170 text {* |
166 text {* |
171 \noindent The corresponding code in Haskell uses that language's |
167 \noindent The corresponding code in Haskell uses that language's |
172 native classes: |
168 native classes: |
173 *} |
169 *} |
174 |
170 |
175 text %quote {* |
171 text %quote %typewriter {* |
176 \begin{typewriter} |
172 @{code_stmts bexp (Haskell)} |
177 @{code_stmts bexp (Haskell)} |
|
178 \end{typewriter} |
|
179 *} |
173 *} |
180 |
174 |
181 text {* |
175 text {* |
182 \noindent This is a convenient place to show how explicit dictionary |
176 \noindent This is a convenient place to show how explicit dictionary |
183 construction manifests in generated code -- the same example in |
177 construction manifests in generated code -- the same example in |
184 @{text SML}: |
178 @{text SML}: |
185 *} |
179 *} |
186 |
180 |
187 text %quote {* |
181 text %quote %typewriter {* |
188 \begin{typewriter} |
182 @{code_stmts bexp (SML)} |
189 @{code_stmts bexp (SML)} |
|
190 \end{typewriter} |
|
191 *} |
183 *} |
192 |
184 |
193 text {* |
185 text {* |
194 \noindent Note the parameters with trailing underscore (@{verbatim |
186 \noindent Note the parameters with trailing underscore (@{verbatim |
195 "A_"}), which are the dictionary parameters. |
187 "A_"}), which are the dictionary parameters. |