src/Tools/Code/code_target.ML
changeset 32966 5b21661fe618
parent 32894 cdd7800de437
child 33522 737589bb9bb8
equal deleted inserted replaced
32965:ecb746bca732 32966:5b21661fe618
    58 
    58 
    59 datatype destination = Compile | Export | File of Path.T | String of string list;
    59 datatype destination = Compile | Export | File of Path.T | String of string list;
    60 type serialization = destination -> (string * string option list) option;
    60 type serialization = destination -> (string * string option list) option;
    61 
    61 
    62 val code_width = Unsynchronized.ref 80; (*FIXME after Pretty module no longer depends on print mode*)
    62 val code_width = Unsynchronized.ref 80; (*FIXME after Pretty module no longer depends on print mode*)
    63 fun code_setmp f = PrintMode.setmp [] (Pretty.setmp_margin (!code_width) f);
    63 fun code_setmp f = PrintMode.setmp [] (Pretty.setmp_margin_CRITICAL (!code_width) f);
    64 fun code_of_pretty p = code_setmp Pretty.string_of p ^ "\n";
    64 fun code_of_pretty p = code_setmp Pretty.string_of p ^ "\n";
    65 fun code_writeln p = Pretty.setmp_margin (!code_width) Pretty.writeln p;
    65 fun code_writeln p = Pretty.setmp_margin_CRITICAL (!code_width) Pretty.writeln p;
    66 
    66 
    67 (*FIXME why another code_setmp?*)
    67 (*FIXME why another code_setmp?*)
    68 fun compile f = (code_setmp f Compile; ());
    68 fun compile f = (code_setmp f Compile; ());
    69 fun export f = (code_setmp f Export; ());
    69 fun export f = (code_setmp f Export; ());
    70 fun file p f = (code_setmp f (File p); ());
    70 fun file p f = (code_setmp f (File p); ());