src/Doc/Isar_Ref/Spec.thy
changeset 81116 0fb1e2dd4122
parent 81113 6fefd6c602fa
child 81514 98cb63b447c6
equal deleted inserted replaced
81115:7b3b27576f45 81116:0fb1e2dd4122
   244     ;
   244     ;
   245     @{syntax_def "includes"}: @'includes' @{syntax bundles}
   245     @{syntax_def "includes"}: @'includes' @{syntax bundles}
   246     ;
   246     ;
   247     @{syntax_def "opening"}: @'opening' @{syntax bundles}
   247     @{syntax_def "opening"}: @'opening' @{syntax bundles}
   248     ;
   248     ;
   249     @{syntax bundles}: @{syntax name} + @'and'
   249     @{syntax bundles}: ('no')? @{syntax name} + @'and'
   250   \<close>
   250   \<close>
   251 
   251 
   252   \<^descr> \<^theory_text>\<open>bundle b = decls\<close> defines a bundle of declarations in the current
   252   \<^descr> \<^theory_text>\<open>bundle b = decls\<close> defines a bundle of declarations in the current
   253   context. The RHS is similar to the one of the \<^theory_text>\<open>declare\<close> command. Bundles
   253   context. The RHS is similar to the one of the \<^theory_text>\<open>declare\<close> command. Bundles
   254   defined in local theory targets are subject to transformations via
   254   defined in local theory targets are subject to transformations via
   286 
   286 
   287   \<^descr> \<^theory_text>\<open>opening \<^vec>b\<close> is similar to \<^theory_text>\<open>includes\<close>, but applies to a named
   287   \<^descr> \<^theory_text>\<open>opening \<^vec>b\<close> is similar to \<^theory_text>\<open>includes\<close>, but applies to a named
   288   specification context: \<^theory_text>\<open>locale\<close>s, \<^theory_text>\<open>class\<close>es and named \<^theory_text>\<open>context\<close>s. The
   288   specification context: \<^theory_text>\<open>locale\<close>s, \<^theory_text>\<open>class\<close>es and named \<^theory_text>\<open>context\<close>s. The
   289   effect is confined to the surface context within the specification block
   289   effect is confined to the surface context within the specification block
   290   itself and the corresponding \<^theory_text>\<open>begin\<close> / \<^theory_text>\<open>end\<close> block.
   290   itself and the corresponding \<^theory_text>\<open>begin\<close> / \<^theory_text>\<open>end\<close> block.
       
   291 
       
   292   \<^descr> Bundle names may be prefixed by the reserved word \<^verbatim>\<open>no\<close> to indicate that
       
   293   the polarity of certain declaration commands should be inverted, notably:
       
   294 
       
   295     \<^item> @{command syntax} versus @{command no_syntax}
       
   296     \<^item> @{command notation} versus @{command no_notation}
       
   297     \<^item> @{command type_notation} versus @{command no_type_notation}
       
   298 
       
   299   This also works recursively for the @{command unbundle} command as
       
   300   declaration inside a @{command bundle} definition.
       
   301 
   291 
   302 
   292   Here is an artificial example of bundling various configuration options:
   303   Here is an artificial example of bundling various configuration options:
   293 \<close>
   304 \<close>
   294 
   305 
   295 (*<*)experiment begin(*>*)
   306 (*<*)experiment begin(*>*)