clarified signature: do not require finished theory;
authorwenzelm
Wed, 02 Nov 2022 10:24:44 +0100
changeset 76404 4de3d831ff4d
parent 76403 fb9c567a67cd
child 76405 aaf307f865c9
clarified signature: do not require finished theory;
src/Pure/Thy/document_output.ML
src/Pure/Thy/thy_info.ML
--- a/src/Pure/Thy/document_output.ML	Wed Nov 02 09:47:27 2022 +0100
+++ b/src/Pure/Thy/document_output.ML	Wed Nov 02 10:24:44 2022 +0100
@@ -16,7 +16,7 @@
   type segment =
     {span: Command_Span.span, command: Toplevel.transition,
      prev_state: Toplevel.state, state: Toplevel.state}
-  val present_thy: Options.T -> theory -> segment list -> Latex.text
+  val present_thy: Options.T -> Keyword.keywords -> segment list -> Latex.text
   val pretty_term: Proof.context -> term -> Pretty.T
   val pretty_thm: Proof.context -> thm -> Pretty.T
   val isabelle: Proof.context -> Latex.text -> Latex.text
@@ -401,11 +401,8 @@
 
 in
 
-fun present_thy options thy (segments: segment list) =
+fun present_thy options keywords (segments: segment list) =
   let
-    val keywords = Thy_Header.get_keywords thy;
-
-
     (* tokens *)
 
     val ignored = Scan.state --| ignore
--- a/src/Pure/Thy/thy_info.ML	Wed Nov 02 09:47:27 2022 +0100
+++ b/src/Pure/Thy/thy_info.ML	Wed Nov 02 10:24:44 2022 +0100
@@ -58,7 +58,7 @@
     if exists (Toplevel.is_skipped_proof o #state) segments then ()
     else
       let
-        val body = Document_Output.present_thy options thy segments;
+        val body = Document_Output.present_thy options (Thy_Header.get_keywords thy) segments;
       in
         if Options.string options "document" = "false" then ()
         else