doc-src/IsarImplementation/Thy/Prelim.thy
changeset 33174 1f2051f41335
parent 30365 790129514c2d
child 33524 a08e6c1cbc04
equal deleted inserted replaced
33173:b8ca12f6681a 33174:1f2051f41335
   687   @{index_ML Long_Name.append: "string -> string -> string"} \\
   687   @{index_ML Long_Name.append: "string -> string -> string"} \\
   688   @{index_ML Long_Name.implode: "string list -> string"} \\
   688   @{index_ML Long_Name.implode: "string list -> string"} \\
   689   @{index_ML Long_Name.explode: "string -> string list"} \\
   689   @{index_ML Long_Name.explode: "string -> string list"} \\
   690   \end{mldecls}
   690   \end{mldecls}
   691   \begin{mldecls}
   691   \begin{mldecls}
   692   @{index_ML_type NameSpace.naming} \\
   692   @{index_ML_type Name_Space.naming} \\
   693   @{index_ML NameSpace.default_naming: NameSpace.naming} \\
   693   @{index_ML Name_Space.default_naming: Name_Space.naming} \\
   694   @{index_ML NameSpace.add_path: "string -> NameSpace.naming -> NameSpace.naming"} \\
   694   @{index_ML Name_Space.add_path: "string -> Name_Space.naming -> Name_Space.naming"} \\
   695   @{index_ML NameSpace.full_name: "NameSpace.naming -> binding -> string"} \\
   695   @{index_ML Name_Space.full_name: "Name_Space.naming -> binding -> string"} \\
   696   \end{mldecls}
   696   \end{mldecls}
   697   \begin{mldecls}
   697   \begin{mldecls}
   698   @{index_ML_type NameSpace.T} \\
   698   @{index_ML_type Name_Space.T} \\
   699   @{index_ML NameSpace.empty: NameSpace.T} \\
   699   @{index_ML Name_Space.empty: "string -> Name_Space.T"} \\
   700   @{index_ML NameSpace.merge: "NameSpace.T * NameSpace.T -> NameSpace.T"} \\
   700   @{index_ML Name_Space.merge: "Name_Space.T * Name_Space.T -> Name_Space.T"} \\
   701   @{index_ML NameSpace.declare: "NameSpace.naming -> binding -> NameSpace.T ->
   701   @{index_ML Name_Space.declare: "bool -> Name_Space.naming -> binding -> Name_Space.T ->
   702   string * NameSpace.T"} \\
   702   string * Name_Space.T"} \\
   703   @{index_ML NameSpace.intern: "NameSpace.T -> string -> string"} \\
   703   @{index_ML Name_Space.intern: "Name_Space.T -> string -> string"} \\
   704   @{index_ML NameSpace.extern: "NameSpace.T -> string -> string"} \\
   704   @{index_ML Name_Space.extern: "Name_Space.T -> string -> string"} \\
   705   \end{mldecls}
   705   \end{mldecls}
   706 
   706 
   707   \begin{description}
   707   \begin{description}
   708 
   708 
   709   \item @{ML Long_Name.base_name}~@{text "name"} returns the base name of a
   709   \item @{ML Long_Name.base_name}~@{text "name"} returns the base name of a
   717 
   717 
   718   \item @{ML Long_Name.implode}~@{text "names"} and @{ML
   718   \item @{ML Long_Name.implode}~@{text "names"} and @{ML
   719   Long_Name.explode}~@{text "name"} convert between the packed string
   719   Long_Name.explode}~@{text "name"} convert between the packed string
   720   representation and the explicit list form of qualified names.
   720   representation and the explicit list form of qualified names.
   721 
   721 
   722   \item @{ML_type NameSpace.naming} represents the abstract concept of
   722   \item @{ML_type Name_Space.naming} represents the abstract concept of
   723   a naming policy.
   723   a naming policy.
   724 
   724 
   725   \item @{ML NameSpace.default_naming} is the default naming policy.
   725   \item @{ML Name_Space.default_naming} is the default naming policy.
   726   In a theory context, this is usually augmented by a path prefix
   726   In a theory context, this is usually augmented by a path prefix
   727   consisting of the theory name.
   727   consisting of the theory name.
   728 
   728 
   729   \item @{ML NameSpace.add_path}~@{text "path naming"} augments the
   729   \item @{ML Name_Space.add_path}~@{text "path naming"} augments the
   730   naming policy by extending its path component.
   730   naming policy by extending its path component.
   731 
   731 
   732   \item @{ML NameSpace.full_name}~@{text "naming binding"} turns a
   732   \item @{ML Name_Space.full_name}~@{text "naming binding"} turns a
   733   name binding (usually a basic name) into the fully qualified
   733   name binding (usually a basic name) into the fully qualified
   734   internal name, according to the given naming policy.
   734   internal name, according to the given naming policy.
   735 
   735 
   736   \item @{ML_type NameSpace.T} represents name spaces.
   736   \item @{ML_type Name_Space.T} represents name spaces.
   737 
   737 
   738   \item @{ML NameSpace.empty} and @{ML NameSpace.merge}~@{text
   738   \item @{ML Name_Space.empty}~@{text "kind"} and @{ML Name_Space.merge}~@{text
   739   "(space\<^isub>1, space\<^isub>2)"} are the canonical operations for
   739   "(space\<^isub>1, space\<^isub>2)"} are the canonical operations for
   740   maintaining name spaces according to theory data management
   740   maintaining name spaces according to theory data management
   741   (\secref{sec:context-data}).
   741   (\secref{sec:context-data}); @{text "kind"} is a formal comment
   742 
   742   to characterize the purpose of a name space.
   743   \item @{ML NameSpace.declare}~@{text "naming bindings space"} enters a
   743 
   744   name binding as fully qualified internal name into the name space,
   744   \item @{ML Name_Space.declare}~@{text "strict naming bindings
   745   with external accesses determined by the naming policy.
   745   space"} enters a name binding as fully qualified internal name into
   746 
   746   the name space, with external accesses determined by the naming
   747   \item @{ML NameSpace.intern}~@{text "space name"} internalizes a
   747   policy.
       
   748 
       
   749   \item @{ML Name_Space.intern}~@{text "space name"} internalizes a
   748   (partially qualified) external name.
   750   (partially qualified) external name.
   749 
   751 
   750   This operation is mostly for parsing!  Note that fully qualified
   752   This operation is mostly for parsing!  Note that fully qualified
   751   names stemming from declarations are produced via @{ML
   753   names stemming from declarations are produced via @{ML
   752   "NameSpace.full_name"} and @{ML "NameSpace.declare"}
   754   "Name_Space.full_name"} and @{ML "Name_Space.declare"}
   753   (or their derivatives for @{ML_type theory} and
   755   (or their derivatives for @{ML_type theory} and
   754   @{ML_type Proof.context}).
   756   @{ML_type Proof.context}).
   755 
   757 
   756   \item @{ML NameSpace.extern}~@{text "space name"} externalizes a
   758   \item @{ML Name_Space.extern}~@{text "space name"} externalizes a
   757   (fully qualified) internal name.
   759   (fully qualified) internal name.
   758 
   760 
   759   This operation is mostly for printing!  User code should not rely on
   761   This operation is mostly for printing!  User code should not rely on
   760   the precise result too much.
   762   the precise result too much.
   761 
   763