ProgTutorial/Package/Ind_Interface.thy
changeset 365 718beb785213
parent 346 0fea8b7a14a1
child 426 d94755882e36
equal deleted inserted replaced
364:c6a2e295227e 365:718beb785213
   127   need for calling the package and setting up the keyword. The latter is
   127   need for calling the package and setting up the keyword. The latter is
   128   done in Lines 5 to 7 in the code below.
   128   done in Lines 5 to 7 in the code below.
   129 *}
   129 *}
   130 (*<*)ML %no{*fun add_inductive_cmd pred_specs rule_specs lthy = lthy 
   130 (*<*)ML %no{*fun add_inductive_cmd pred_specs rule_specs lthy = lthy 
   131    fun add_inductive pred_specs rule_specs lthy = lthy*}(*>*)
   131    fun add_inductive pred_specs rule_specs lthy = lthy*}(*>*)
   132 ML_val %linenosgray{*val specification =
   132 ML_val %linenosgray{*val specification : (local_theory -> local_theory) parser =
   133   spec_parser >>
   133   spec_parser >>
   134     (fn (pred_specs, rule_specs) => add_inductive_cmd pred_specs rule_specs)
   134     (fn (pred_specs, rule_specs) => add_inductive_cmd pred_specs rule_specs)
   135 
   135 
   136 val _ = OuterSyntax.local_theory "simple_inductive2" 
   136 val _ = OuterSyntax.local_theory "simple_inductive2" 
   137           "definition of simple inductive predicates"
   137           "definition of simple inductive predicates"