diff -r 21c2b1f691d1 -r 0d399131008f src/Tools/SML/Examples.thy --- a/src/Tools/SML/Examples.thy Mon Nov 30 13:16:12 2015 +0100 +++ b/src/Tools/SML/Examples.thy Mon Nov 30 14:24:51 2015 +0100 @@ -9,12 +9,12 @@ begin text \ - Isabelle/ML is a somewhat augmented version of Standard ML, with - various add-ons that are indispensable for Isabelle development, but - may cause conflicts with independent projects in plain Standard ML. + Isabelle/ML is a somewhat augmented version of Standard ML, with various + add-ons that are indispensable for Isabelle development, but may cause + conflicts with independent projects in plain Standard ML. - The Isabelle/Isar command 'SML_file' supports official Standard ML - within the Isabelle environment, with full support in the Prover IDE + The Isabelle/Isar command \<^theory_text>\SML_file\ supports official Standard ML within + the Isabelle environment, with full support in the Prover IDE (Isabelle/jEdit). Here is a very basic example that defines the factorial function and @@ -24,10 +24,10 @@ SML_file "factorial.sml" text \ - The subsequent example illustrates the use of multiple 'SML_file' - commands to build larger Standard ML projects. The toplevel SML - environment is enriched cumulatively within the theory context of - Isabelle --- independently of the Isabelle/ML environment. + The subsequent example illustrates the use of multiple \<^theory_text>\SML_file\ commands + to build larger Standard ML projects. The toplevel SML environment is + enriched cumulatively within the theory context of Isabelle --- + independently of the Isabelle/ML environment. \ SML_file "Example.sig" @@ -36,17 +36,17 @@ text \ Isabelle/ML and SML share a common run-time system, but the static - environments are separate. It is possible to exchange toplevel bindings - via separate commands like this. + environments are separate. It is possible to exchange toplevel bindings via + separate commands like this. \ -SML_export \val f = factorial\ -- \re-use factorial from SML environment\ +SML_export \val f = factorial\ \ \re-use factorial from SML environment\ ML \f 42\ SML_import \val println = Output.writeln\ - -- \re-use Isabelle/ML channel for SML\ + \ \re-use Isabelle/ML channel for SML\ SML_import \val par_map = Par_List.map\ - -- \re-use Isabelle/ML parallel list combinator for SML\ + \ \re-use Isabelle/ML parallel list combinator for SML\ end