68090
|
1 |
(* Title: Pure/Thy/export.ML
|
|
2 |
Author: Makarius
|
|
3 |
|
|
4 |
Manage theory exports.
|
|
5 |
*)
|
|
6 |
|
|
7 |
signature EXPORT =
|
|
8 |
sig
|
|
9 |
val export: theory -> string -> Output.output -> unit
|
|
10 |
val export_uncompressed: theory -> string -> Output.output -> unit
|
|
11 |
end;
|
|
12 |
|
|
13 |
structure Export: EXPORT =
|
|
14 |
struct
|
|
15 |
|
|
16 |
fun gen_export compress thy name output =
|
|
17 |
(Output.try_protocol_message o Markup.export)
|
|
18 |
{id = Position.get_id (Position.thread_data ()),
|
68101
|
19 |
serial = serial (),
|
68090
|
20 |
theory_name = Context.theory_long_name thy,
|
|
21 |
name = name,
|
|
22 |
compress = compress} [output];
|
|
23 |
|
|
24 |
val export = gen_export true;
|
|
25 |
val export_uncompressed = gen_export false;
|
|
26 |
|
|
27 |
end;
|