src/Pure/Thy/present.ML
changeset 32738 15bb09ca0378
parent 31819 2c0ab4485f48
child 33522 737589bb9bb8
equal deleted inserted replaced
32737:76fa673eee8b 32738:15bb09ca0378
   159   make_browser_info (f (theories, files, tex_index, html_index, graph));
   159   make_browser_info (f (theories, files, tex_index, html_index, graph));
   160 
   160 
   161 
   161 
   162 (* state *)
   162 (* state *)
   163 
   163 
   164 val browser_info = ref empty_browser_info;
   164 val browser_info = Unsynchronized.ref empty_browser_info;
   165 fun change_browser_info f = CRITICAL (fn () => change browser_info (map_browser_info f));
   165 fun change_browser_info f =
   166 
   166   CRITICAL (fn () => Unsynchronized.change browser_info (map_browser_info f));
   167 val suppress_tex_source = ref false;
   167 
       
   168 val suppress_tex_source = Unsynchronized.ref false;
   168 fun no_document f x = setmp_noncritical suppress_tex_source true f x;
   169 fun no_document f x = setmp_noncritical suppress_tex_source true f x;
   169 
   170 
   170 fun init_theory_info name info =
   171 fun init_theory_info name info =
   171   change_browser_info (fn (theories, files, tex_index, html_index, graph) =>
   172   change_browser_info (fn (theories, files, tex_index, html_index, graph) =>
   172     (Symtab.update (name, info) theories, files, tex_index, html_index, graph));
   173     (Symtab.update (name, info) theories, files, tex_index, html_index, graph));
   227     verbose = verbose, readme = readme}: session_info;
   228     verbose = verbose, readme = readme}: session_info;
   228 
   229 
   229 
   230 
   230 (* state *)
   231 (* state *)
   231 
   232 
   232 val session_info = ref (NONE: session_info option);
   233 val session_info = Unsynchronized.ref (NONE: session_info option);
   233 
   234 
   234 fun with_session x f = (case ! session_info of NONE => x | SOME info => f info);
   235 fun with_session x f = (case ! session_info of NONE => x | SOME info => f info);
   235 fun with_context f = f (Context.theory_name (ML_Context.the_global_context ()));
   236 fun with_context f = f (Context.theory_name (ML_Context.the_global_context ()));
   236 
   237 
   237 
   238 
   532   in isabelle_document false doc_format documentN "" doc_path result_path end;
   533   in isabelle_document false doc_format documentN "" doc_path result_path end;
   533 
   534 
   534 
   535 
   535 end;
   536 end;
   536 
   537 
   537 structure BasicPresent: BASIC_PRESENT = Present;
   538 structure Basic_Present: BASIC_PRESENT = Present;
   538 open BasicPresent;
   539 open Basic_Present;