doc-src/IsarImplementation/Thy/document/integration.tex
changeset 22090 bc8aee017f8a
parent 21402 c15bcd87f47c
child 22096 fed088a475f9
equal deleted inserted replaced
22089:d9b614dc883d 22090:bc8aee017f8a
   299 %
   299 %
   300 \isatagmlref
   300 \isatagmlref
   301 %
   301 %
   302 \begin{isamarkuptext}%
   302 \begin{isamarkuptext}%
   303 \begin{mldecls}
   303 \begin{mldecls}
   304   \indexml{context}\verb|context: theory -> unit| \\
       
   305   \indexml{the-context}\verb|the_context: unit -> theory| \\
   304   \indexml{the-context}\verb|the_context: unit -> theory| \\
   306   \indexml{Context.$>$$>$ }\verb|Context.>> : (theory -> theory) -> unit| \\
   305   \indexml{Context.$>$$>$ }\verb|Context.>> : (theory -> theory) -> unit| \\
   307   \end{mldecls}
   306   \end{mldecls}
   308 
   307 
   309   \begin{description}
   308   \begin{description}
   310 
       
   311   \item \verb|context|~\isa{thy} sets the {\ML} theory context to
       
   312   \isa{thy}.  This is usually performed automatically by the system,
       
   313   when dropping out of the interactive Isar toplevel into {\ML}, or
       
   314   when Isar invokes {\ML} to process code from a string or a file.
       
   315 
   309 
   316   \item \verb|the_context ()| refers to the theory context of the
   310   \item \verb|the_context ()| refers to the theory context of the
   317   {\ML} toplevel --- at compile time!  {\ML} code needs to take care
   311   {\ML} toplevel --- at compile time!  {\ML} code needs to take care
   318   to refer to \verb|the_context ()| correctly.  Recall that
   312   to refer to \verb|the_context ()| correctly.  Recall that
   319   evaluation of a function body is delayed until actual runtime.
   313   evaluation of a function body is delayed until actual runtime.