doc-src/IsarRef/pure.tex
changeset 8726 7b15f4bdd72f
parent 8696 37cbb053791c
child 8881 0467dd0d66ff
equal deleted inserted replaced
8725:0e48ee5b52db 8726:7b15f4bdd72f
   317 \end{descr}
   317 \end{descr}
   318 
   318 
   319 
   319 
   320 \subsection{Name spaces}
   320 \subsection{Name spaces}
   321 
   321 
   322 \indexisarcmd{global}\indexisarcmd{local}
   322 \indexisarcmd{global}\indexisarcmd{local}\indexisarcmd{hide}
   323 \begin{matharray}{rcl}
   323 \begin{matharray}{rcl}
   324   \isarcmd{global} & : & \isartrans{theory}{theory} \\
   324   \isarcmd{global} & : & \isartrans{theory}{theory} \\
   325   \isarcmd{local} & : & \isartrans{theory}{theory} \\
   325   \isarcmd{local} & : & \isartrans{theory}{theory} \\
   326 \end{matharray}
   326   \isarcmd{hide} & : & \isartrans{theory}{theory} \\
       
   327 \end{matharray}
       
   328 
       
   329 \begin{rail}
       
   330   'global' comment?
       
   331   ;
       
   332   'local' comment?
       
   333   ;
       
   334   'hide' name (nameref + ) comment?
       
   335   ;
       
   336 \end{rail}
   327 
   337 
   328 Isabelle organizes any kind of name declarations (of types, constants,
   338 Isabelle organizes any kind of name declarations (of types, constants,
   329 theorems etc.) by separate hierarchically structured name spaces.  Normally
   339 theorems etc.) by separate hierarchically structured name spaces.  Normally
   330 the user never has to control the behavior of name space entry by hand, yet
   340 the user does not have to control the behavior of name spaces by hand, yet the
   331 the following commands provide some way to do so.
   341 following commands provide some way to do so.
   332 
   342 
   333 \begin{descr}
   343 \begin{descr}
   334 \item [$\isarkeyword{global}$ and $\isarkeyword{local}$] change the current
   344 \item [$\isarkeyword{global}$ and $\isarkeyword{local}$] change the current
   335   name declaration mode.  Initially, theories start in $\isarkeyword{local}$
   345   name declaration mode.  Initially, theories start in $\isarkeyword{local}$
   336   mode, causing all names to be automatically qualified by the theory name.
   346   mode, causing all names to be automatically qualified by the theory name.
   337   Changing this to $\isarkeyword{global}$ causes all names to be declared
   347   Changing this to $\isarkeyword{global}$ causes all names to be declared
   338   without the theory prefix, until $\isarkeyword{local}$ is declared again.
   348   without the theory prefix, until $\isarkeyword{local}$ is declared again.
       
   349   
       
   350   Note that global names are prone to get hidden accidently later, when
       
   351   qualified names of the same base name are introduced.
       
   352   
       
   353 \item [$\isarkeyword{hide}~space~names$] removes declarations from a given
       
   354   name space (which may be $class$, $type$, or $const$).  Hidden objects
       
   355   remain valid within the logic, but are inaccessible from user input.  In
       
   356   output, the special qualifier ``$\mathord?\mathord?$'' is prefixed to the
       
   357   full internal name.
       
   358   
       
   359   Unqualified (global) names may not be hidden deliberately.
   339 \end{descr}
   360 \end{descr}
   340 
   361 
   341 
   362 
   342 \subsection{Incorporating ML code}\label{sec:ML}
   363 \subsection{Incorporating ML code}\label{sec:ML}
   343 
   364