# HG changeset patch # User wenzelm # Date 1605561784 -3600 # Node ID 830222403681abcaaa026654bf9ff3542e697e8b # Parent 65554bac121b34238c926c70a7ba018a41db12c0 HTML presentation in Isabelle/Scala, based on theory html exports from Isabelle/ML; diff -r 65554bac121b -r 830222403681 src/Pure/PIDE/session.ML --- a/src/Pure/PIDE/session.ML Mon Nov 16 22:21:40 2020 +0100 +++ b/src/Pure/PIDE/session.ML Mon Nov 16 22:23:04 2020 +0100 @@ -9,7 +9,7 @@ val get_name: unit -> string val welcome: unit -> string val get_keywords: unit -> Keyword.keywords - val init: bool -> Path.T -> string list -> string -> string * string -> bool -> unit + val init: string -> string * string -> unit val shutdown: unit -> unit val finish: unit -> unit end; @@ -45,12 +45,11 @@ (* init *) -fun init info info_path documents parent (chapter, name) verbose = +fun init parent (chapter, name) = (Synchronized.change session (fn ({name = parent_name, ...}, parent_finished) => if parent_name <> parent orelse not parent_finished then error ("Unfinished parent session " ^ quote parent ^ " for " ^ quote name) - else ({chapter = chapter, name = name}, false)); - Present.init info info_path documents (chapter, name) verbose); + else ({chapter = chapter, name = name}, false))); (* finish *) @@ -64,7 +63,6 @@ (shutdown (); Par_List.map (Global_Theory.get_thm_names o Thy_Info.get_theory) (Thy_Info.get_names ()); Thy_Info.finish (); - Present.finish (); shutdown (); update_keywords (); Synchronized.change session (apsnd (K true))); diff -r 65554bac121b -r 830222403681 src/Pure/Thy/html.ML --- a/src/Pure/Thy/html.ML Mon Nov 16 22:21:40 2020 +0100 +++ b/src/Pure/Thy/html.ML Mon Nov 16 22:23:04 2020 +0100 @@ -1,5 +1,5 @@ (* Title: Pure/Thy/html.ML - Author: Markus Wenzel and Stefan Berghofer, TU Muenchen + Author: Makarius HTML presentation elements. *) @@ -11,11 +11,14 @@ val no_symbols: symbols val present_span: symbols -> Keyword.keywords -> Command_Span.span -> Output.output type text = string + val name: symbols -> string -> text + val keyword: symbols -> string -> text + val command: symbols -> string -> text + val href_name: string -> string -> string + val href_path: Url.T -> string -> string + val href_opt_path: Url.T option -> string -> string val begin_document: symbols -> string -> text val end_document: text - val begin_session_index: symbols -> string -> Url.T -> (Url.T * string) list -> text - val theory_entry: symbols -> Url.T * string -> text - val theory: symbols -> string -> (Url.T option * string) list -> text -> text end; structure HTML: HTML = @@ -120,8 +123,6 @@ fun href_opt_path NONE txt = txt | href_opt_path (SOME p) txt = href_path p txt; -fun para txt = "\n
" ^ txt ^ "
\n"; - (* document *) @@ -142,27 +143,4 @@ val end_document = "\n\n