src/Pure/Isar/isar_thy.ML
changeset 7775 26898fbd19ca
parent 7734 9c098c777926
child 7851 4a6df182b093
equal deleted inserted replaced
7774:6da9b544a12d 7775:26898fbd19ca
    11   val add_chapter: Comment.text -> theory -> theory
    11   val add_chapter: Comment.text -> theory -> theory
    12   val add_section: Comment.text -> theory -> theory
    12   val add_section: Comment.text -> theory -> theory
    13   val add_subsection: Comment.text -> theory -> theory
    13   val add_subsection: Comment.text -> theory -> theory
    14   val add_subsubsection: Comment.text -> theory -> theory
    14   val add_subsubsection: Comment.text -> theory -> theory
    15   val add_text: Comment.text -> theory -> theory
    15   val add_text: Comment.text -> theory -> theory
       
    16   val add_verbatim: Comment.text -> theory -> theory
    16   val add_sect: Comment.text -> ProofHistory.T -> ProofHistory.T
    17   val add_sect: Comment.text -> ProofHistory.T -> ProofHistory.T
    17   val add_subsect: Comment.text -> ProofHistory.T -> ProofHistory.T
    18   val add_subsect: Comment.text -> ProofHistory.T -> ProofHistory.T
    18   val add_subsubsect: Comment.text -> ProofHistory.T -> ProofHistory.T
    19   val add_subsubsect: Comment.text -> ProofHistory.T -> ProofHistory.T
    19   val add_txt: Comment.text -> ProofHistory.T -> ProofHistory.T
    20   val add_txt: Comment.text -> ProofHistory.T -> ProofHistory.T
       
    21   val add_verb: Comment.text -> ProofHistory.T -> ProofHistory.T
    20   val add_classes: (bclass * xclass list) list * Comment.text -> theory -> theory
    22   val add_classes: (bclass * xclass list) list * Comment.text -> theory -> theory
    21   val add_classes_i: (bclass * class list) list * Comment.text  -> theory -> theory
    23   val add_classes_i: (bclass * class list) list * Comment.text  -> theory -> theory
    22   val add_classrel: (xclass * xclass) * Comment.text -> theory -> theory
    24   val add_classrel: (xclass * xclass) * Comment.text -> theory -> theory
    23   val add_classrel_i: (class * class) * Comment.text -> theory -> theory
    25   val add_classrel_i: (class * class) * Comment.text -> theory -> theory
    24   val add_defsort: xsort * Comment.text -> theory -> theory
    26   val add_defsort: xsort * Comment.text -> theory -> theory
   168 
   170 
   169 fun add_header comment =
   171 fun add_header comment =
   170   Toplevel.keep (fn state => if Toplevel.is_toplevel state then () else raise Toplevel.UNDEF);
   172   Toplevel.keep (fn state => if Toplevel.is_toplevel state then () else raise Toplevel.UNDEF);
   171 
   173 
   172 fun add_text comment thy = thy:theory;
   174 fun add_text comment thy = thy:theory;
       
   175 val add_verbatim = add_text;
   173 val add_chapter = add_text;
   176 val add_chapter = add_text;
   174 
   177 
   175 fun gen_add_section add present txt thy =
   178 fun gen_add_section add present txt thy =
   176   (Context.setmp (Some thy) present (Comment.string_of txt); add txt thy);
   179   (Context.setmp (Some thy) present (Comment.string_of txt); add txt thy);
   177 
   180 
   178 val add_section = gen_add_section add_text Present.section;
   181 val add_section = gen_add_section add_text Present.section;
   179 val add_subsection = gen_add_section add_text Present.subsection;
   182 val add_subsection = gen_add_section add_text Present.subsection;
   180 val add_subsubsection = gen_add_section add_text Present.subsubsection;
   183 val add_subsubsection = gen_add_section add_text Present.subsubsection;
   181 
   184 
   182 fun add_txt comment = ProofHistory.apply Proof.assert_forward;
   185 fun add_txt comment = ProofHistory.apply Proof.assert_forward;
       
   186 val add_verb = add_txt;
   183 val add_sect = add_txt;
   187 val add_sect = add_txt;
   184 val add_subsect = add_txt;
   188 val add_subsect = add_txt;
   185 val add_subsubsect = add_txt;
   189 val add_subsubsect = add_txt;
   186 
   190 
   187 
   191