# HG changeset patch # User wenzelm # Date 1418235961 -3600 # Node ID 7b1931111e375c28bcfe4be01a88c438d4ad48bb # Parent 723b11f8ffbf3244db773873073243ae50fb5b97 more examples; diff -r 723b11f8ffbf -r 7b1931111e37 src/HOL/ex/Cartouche_Examples.thy --- a/src/HOL/ex/Cartouche_Examples.thy Wed Dec 10 19:24:54 2014 +0100 +++ b/src/HOL/ex/Cartouche_Examples.thy Wed Dec 10 19:26:01 2014 +0100 @@ -261,14 +261,27 @@ by (\rtac @{thm impI} 1\, \etac @{thm conjE} 1\, \rtac @{thm conjI} 1\, \atac 1\+) -subsection \ML syntax: input source\ +subsection \ML syntax\ +text \Input source with position information:\ ML \ val s: Input.source = \abc\; - writeln ("Look here!" ^ Position.here (Input.pos_of s)); + writeln (Markup.markup Markup.information ("Look here!" ^ Position.here (Input.pos_of s))); \abc123def456\ |> Input.source_explode |> List.app (fn (s, pos) => if Symbol.is_digit s then Position.report pos Markup.ML_numeral else ()); \ +text \Nested ML evaluation:\ +ML \ + val ML = ML_Context.eval_source ML_Compiler.flags; + + ML \ML \val a = @{thm refl}\\; + ML \val b = @{thm sym}\; + val c = @{thm trans} + val thms = [a, b, c]; +\ + +ML \\ + end