src/Doc/Isar_Ref/Spec.thy
changeset 62862 007c454d0d0f
parent 62173 a817e4335a31
child 62903 adcce7b8d8ba
equal deleted inserted replaced
62861:cfd2749e1352 62862:007c454d0d0f
  1024 
  1024 
  1025 section \<open>Incorporating ML code \label{sec:ML}\<close>
  1025 section \<open>Incorporating ML code \label{sec:ML}\<close>
  1026 
  1026 
  1027 text \<open>
  1027 text \<open>
  1028   \begin{matharray}{rcl}
  1028   \begin{matharray}{rcl}
  1029     @{command_def "SML_file"} & : & \<open>theory \<rightarrow> theory\<close> \\
  1029     @{command_def "SML_file"} & : & \<open>local_theory \<rightarrow> local_theory\<close> \\
  1030     @{command_def "ML_file"} & : & \<open>local_theory \<rightarrow> local_theory\<close> \\
  1030     @{command_def "ML_file"} & : & \<open>local_theory \<rightarrow> local_theory\<close> \\
  1031     @{command_def "ML"} & : & \<open>local_theory \<rightarrow> local_theory\<close> \\
  1031     @{command_def "ML"} & : & \<open>local_theory \<rightarrow> local_theory\<close> \\
  1032     @{command_def "ML_prf"} & : & \<open>proof \<rightarrow> proof\<close> \\
  1032     @{command_def "ML_prf"} & : & \<open>proof \<rightarrow> proof\<close> \\
  1033     @{command_def "ML_val"} & : & \<open>any \<rightarrow>\<close> \\
  1033     @{command_def "ML_val"} & : & \<open>any \<rightarrow>\<close> \\
  1034     @{command_def "ML_command"} & : & \<open>any \<rightarrow>\<close> \\
  1034     @{command_def "ML_command"} & : & \<open>any \<rightarrow>\<close> \\
  1050     ;
  1050     ;
  1051     @@{command attribute_setup} @{syntax name} '=' @{syntax text} @{syntax text}?
  1051     @@{command attribute_setup} @{syntax name} '=' @{syntax text} @{syntax text}?
  1052   \<close>}
  1052   \<close>}
  1053 
  1053 
  1054   \<^descr> \<^theory_text>\<open>SML_file name\<close> reads and evaluates the given Standard ML file. Top-level
  1054   \<^descr> \<^theory_text>\<open>SML_file name\<close> reads and evaluates the given Standard ML file. Top-level
  1055   SML bindings are stored within the theory context; the initial environment
  1055   SML bindings are stored within the (global or local) theory context; the
  1056   is restricted to the Standard ML implementation of Poly/ML, without the many
  1056   initial environment is restricted to the Standard ML implementation of
  1057   add-ons of Isabelle/ML. Multiple \<^theory_text>\<open>SML_file\<close> commands may be used to build
  1057   Poly/ML, without the many add-ons of Isabelle/ML. Multiple \<^theory_text>\<open>SML_file\<close>
  1058   larger Standard ML projects, independently of the regular Isabelle/ML
  1058   commands may be used to build larger Standard ML projects, independently of
  1059   environment.
  1059   the regular Isabelle/ML environment.
  1060 
  1060 
  1061   \<^descr> \<^theory_text>\<open>ML_file name\<close> reads and evaluates the given ML file. The current theory
  1061   \<^descr> \<^theory_text>\<open>ML_file name\<close> reads and evaluates the given ML file. The current theory
  1062   context is passed down to the ML toplevel and may be modified, using @{ML
  1062   context is passed down to the ML toplevel and may be modified, using @{ML
  1063   "Context.>>"} or derived ML commands. Top-level ML bindings are stored
  1063   "Context.>>"} or derived ML commands. Top-level ML bindings are stored
  1064   within the (global or local) theory context.
  1064   within the (global or local) theory context.