src/Pure/display.ML
changeset 20211 c7f907f41f7c
parent 20076 def4ad161528
child 20226 6ea469c03314
equal deleted inserted replaced
20210:8fe4ae4360eb 20211:c7f907f41f7c
    36   val pretty_thm_no_quote: thm -> Pretty.T
    36   val pretty_thm_no_quote: thm -> Pretty.T
    37   val pretty_thm: thm -> Pretty.T
    37   val pretty_thm: thm -> Pretty.T
    38   val pretty_thms: thm list -> Pretty.T
    38   val pretty_thms: thm list -> Pretty.T
    39   val pretty_thm_sg: theory -> thm -> Pretty.T
    39   val pretty_thm_sg: theory -> thm -> Pretty.T
    40   val pretty_thms_sg: theory -> thm list -> Pretty.T
    40   val pretty_thms_sg: theory -> thm list -> Pretty.T
    41   val pprint_thm: thm -> pprint_args -> unit
       
    42   val pretty_ctyp: ctyp -> Pretty.T
    41   val pretty_ctyp: ctyp -> Pretty.T
    43   val pprint_ctyp: ctyp -> pprint_args -> unit
       
    44   val pretty_cterm: cterm -> Pretty.T
    42   val pretty_cterm: cterm -> Pretty.T
    45   val pprint_cterm: cterm -> pprint_args -> unit
       
    46   val pretty_full_theory: theory -> Pretty.T list
    43   val pretty_full_theory: theory -> Pretty.T list
    47   val pretty_goals_aux: Pretty.pp -> string -> bool * bool -> int -> thm -> Pretty.T list
    44   val pretty_goals_aux: Pretty.pp -> string -> bool * bool -> int -> thm -> Pretty.T list
    48   val pretty_goals: int -> thm -> Pretty.T list
    45   val pretty_goals: int -> thm -> Pretty.T list
    49   val print_goals: int -> thm -> unit
    46   val print_goals: int -> thm -> unit
    50   val current_goals_markers: (string * string * string) ref
    47   val current_goals_markers: (string * string * string) ref
   109 val pretty_thm = gen_pretty_thm true;
   106 val pretty_thm = gen_pretty_thm true;
   110 val pretty_thm_no_quote = gen_pretty_thm false;
   107 val pretty_thm_no_quote = gen_pretty_thm false;
   111 
   108 
   112 
   109 
   113 val string_of_thm = Pretty.string_of o pretty_thm;
   110 val string_of_thm = Pretty.string_of o pretty_thm;
   114 val pprint_thm = Pretty.pprint o pretty_thm;
       
   115 
   111 
   116 fun pretty_thms [th] = pretty_thm th
   112 fun pretty_thms [th] = pretty_thm th
   117   | pretty_thms ths = Pretty.block (Pretty.fbreaks (map pretty_thm ths));
   113   | pretty_thms ths = Pretty.block (Pretty.fbreaks (map pretty_thm ths));
   118 
   114 
   119 val pretty_thm_sg = pretty_thm oo Thm.transfer;
   115 val pretty_thm_sg = pretty_thm oo Thm.transfer;
   133 (* other printing commands *)
   129 (* other printing commands *)
   134 
   130 
   135 fun pretty_ctyp cT =
   131 fun pretty_ctyp cT =
   136   let val {thy, T, ...} = rep_ctyp cT in Sign.pretty_typ thy T end;
   132   let val {thy, T, ...} = rep_ctyp cT in Sign.pretty_typ thy T end;
   137 
   133 
   138 fun pprint_ctyp cT =
       
   139   let val {thy, T, ...} = rep_ctyp cT in Sign.pprint_typ thy T end;
       
   140 
       
   141 fun string_of_ctyp cT =
   134 fun string_of_ctyp cT =
   142   let val {thy, T, ...} = rep_ctyp cT in Sign.string_of_typ thy T end;
   135   let val {thy, T, ...} = rep_ctyp cT in Sign.string_of_typ thy T end;
   143 
   136 
   144 val print_ctyp = writeln o string_of_ctyp;
   137 val print_ctyp = writeln o string_of_ctyp;
   145 
   138 
   146 fun pretty_cterm ct =
   139 fun pretty_cterm ct =
   147   let val {thy, t, ...} = rep_cterm ct in Sign.pretty_term thy t end;
   140   let val {thy, t, ...} = rep_cterm ct in Sign.pretty_term thy t end;
   148 
       
   149 fun pprint_cterm ct =
       
   150   let val {thy, t, ...} = rep_cterm ct in Sign.pprint_term thy t end;
       
   151 
   141 
   152 fun string_of_cterm ct =
   142 fun string_of_cterm ct =
   153   let val {thy, t, ...} = rep_cterm ct in Sign.string_of_term thy t end;
   143   let val {thy, t, ...} = rep_cterm ct in Sign.string_of_term thy t end;
   154 
   144 
   155 val print_cterm = writeln o string_of_cterm;
   145 val print_cterm = writeln o string_of_cterm;