information with hyperlink to "isabelle-export:";
authorwenzelm
Sun, 13 Jan 2019 20:25:41 +0100
changeset 69649 e61b0b819d28
parent 69648 97ddaec3e2ae
child 69650 c95edf19133b
child 69652 3417a8f154eb
child 69654 bc758f4f09e5
information with hyperlink to "isabelle-export:";
NEWS
src/Tools/Code/code_target.ML
--- a/NEWS	Sun Jan 13 19:42:06 2019 +0100
+++ b/NEWS	Sun Jan 13 20:25:41 2019 +0100
@@ -75,9 +75,10 @@
 *** HOL ***
 
 * Code generation: command 'export_code' without file keyword exports
-code as regular theory export, which can be materialized using tool
-'isabelle export'; to get generated code dumped into output, use
-'file ""'.  Minor INCOMPATIBILITY.
+code as regular theory export, which can be materialized using the
+command-line tool "isabelle export", or browsed in Isabelle/jEdit via
+the "isabelle-export:" file-system. To get generated code dumped into
+output, use "file \<open>\<close>". Minor INCOMPATIBILITY.
 
 * Simplified syntax setup for big operators under image. In rare
 situations, type conversions are not inserted implicitly any longer
--- a/src/Tools/Code/code_target.ML	Sun Jan 13 19:42:06 2019 +0100
+++ b/src/Tools/Code/code_target.ML	Sun Jan 13 20:25:41 2019 +0100
@@ -176,11 +176,14 @@
       map (fn (names, p) => File.write (Path.appends (root :: map Path.basic names)) (Code_Printer.format [] width p)) code_modules;
       ());
 
+fun export_information thy name content =
+  (Export.export thy name [content]; Export.information thy "");
+
 fun export_to_exports thy width (Singleton (extension, p)) =
-      Export.export thy (generatedN ^ "." ^ extension) [Code_Printer.format [] width p]
+      export_information thy (generatedN ^ "." ^ extension) (Code_Printer.format [] width p)
   | export_to_exports thy width (Hierarchy code_modules) = (
-      map (fn (names, p) => Export.export thy (Path.implode (Path.make names))
-        [Code_Printer.format [] width p]) code_modules;
+      map (fn (names, p) => export_information thy (Path.implode (Path.make names))
+        (Code_Printer.format [] width p)) code_modules;
       ());
 
 fun export_result ctxt some_file width (pretty_code, _) =