equal
deleted
inserted
replaced
7 signature SESSION = |
7 signature SESSION = |
8 sig |
8 sig |
9 val get_name: unit -> string |
9 val get_name: unit -> string |
10 val welcome: unit -> string |
10 val welcome: unit -> string |
11 val get_keywords: unit -> Keyword.keywords |
11 val get_keywords: unit -> Keyword.keywords |
12 val init: bool -> Path.T -> string list -> string -> string * string -> bool -> unit |
12 val init: string -> string * string -> unit |
13 val shutdown: unit -> unit |
13 val shutdown: unit -> unit |
14 val finish: unit -> unit |
14 val finish: unit -> unit |
15 end; |
15 end; |
16 |
16 |
17 structure Session: SESSION = |
17 structure Session: SESSION = |
43 (Thy_Info.get_names ()) Keyword.empty_keywords)); |
43 (Thy_Info.get_names ()) Keyword.empty_keywords)); |
44 |
44 |
45 |
45 |
46 (* init *) |
46 (* init *) |
47 |
47 |
48 fun init info info_path documents parent (chapter, name) verbose = |
48 fun init parent (chapter, name) = |
49 (Synchronized.change session (fn ({name = parent_name, ...}, parent_finished) => |
49 (Synchronized.change session (fn ({name = parent_name, ...}, parent_finished) => |
50 if parent_name <> parent orelse not parent_finished then |
50 if parent_name <> parent orelse not parent_finished then |
51 error ("Unfinished parent session " ^ quote parent ^ " for " ^ quote name) |
51 error ("Unfinished parent session " ^ quote parent ^ " for " ^ quote name) |
52 else ({chapter = chapter, name = name}, false)); |
52 else ({chapter = chapter, name = name}, false))); |
53 Present.init info info_path documents (chapter, name) verbose); |
|
54 |
53 |
55 |
54 |
56 (* finish *) |
55 (* finish *) |
57 |
56 |
58 fun shutdown () = |
57 fun shutdown () = |
62 |
61 |
63 fun finish () = |
62 fun finish () = |
64 (shutdown (); |
63 (shutdown (); |
65 Par_List.map (Global_Theory.get_thm_names o Thy_Info.get_theory) (Thy_Info.get_names ()); |
64 Par_List.map (Global_Theory.get_thm_names o Thy_Info.get_theory) (Thy_Info.get_names ()); |
66 Thy_Info.finish (); |
65 Thy_Info.finish (); |
67 Present.finish (); |
|
68 shutdown (); |
66 shutdown (); |
69 update_keywords (); |
67 update_keywords (); |
70 Synchronized.change session (apsnd (K true))); |
68 Synchronized.change session (apsnd (K true))); |
71 |
69 |
72 end; |
70 end; |