src/Pure/Thy/export.ML
changeset 69648 97ddaec3e2ae
parent 69627 3e26471d6d01
child 69650 c95edf19133b
equal deleted inserted replaced
69647:cf50cee2adee 69648:97ddaec3e2ae
     6 
     6 
     7 signature EXPORT =
     7 signature EXPORT =
     8 sig
     8 sig
     9   val export: theory -> string -> string list -> unit
     9   val export: theory -> string -> string list -> unit
    10   val export_raw: theory -> string -> string list -> unit
    10   val export_raw: theory -> string -> string list -> unit
       
    11   val markup_text: theory -> string -> Markup.T * string
       
    12   val information: theory -> string -> unit
    11 end;
    13 end;
    12 
    14 
    13 structure Export: EXPORT =
    15 structure Export: EXPORT =
    14 struct
    16 struct
       
    17 
       
    18 (* export *)
    15 
    19 
    16 fun check_name name =
    20 fun check_name name =
    17   let
    21   let
    18     val _ =
    22     val _ =
    19       (case space_explode "/" name of
    23       (case space_explode "/" name of
    30     compress = compress} body;
    34     compress = compress} body;
    31 
    35 
    32 val export = gen_export true;
    36 val export = gen_export true;
    33 val export_raw = gen_export false;
    37 val export_raw = gen_export false;
    34 
    38 
       
    39 
       
    40 (* information message *)
       
    41 
       
    42 fun markup_text thy s =
       
    43   (Markup.theory_exports (Context.theory_long_name thy ^ (if s = "" then "" else "/" ^ s)),
       
    44     "theory exports");
       
    45 
       
    46 fun information thy s =
       
    47   Output.information ("See " ^ uncurry Markup.markup (markup_text thy s));
       
    48 
    35 end;
    49 end;