src/Pure/goal_display.ML
changeset 49847 ed5080c03165
parent 45666 d83797ef0d2d
child 50201 c26369c9eda6
equal deleted inserted replaced
49846:8fae089f5a0c 49847:ed5080c03165
    18   val show_consts_raw: Config.raw
    18   val show_consts_raw: Config.raw
    19   val show_consts: bool Config.T
    19   val show_consts: bool Config.T
    20   val pretty_flexpair: Proof.context -> term * term -> Pretty.T
    20   val pretty_flexpair: Proof.context -> term * term -> Pretty.T
    21   val pretty_goals: Proof.context -> thm -> Pretty.T list
    21   val pretty_goals: Proof.context -> thm -> Pretty.T list
    22   val pretty_goals_without_context: thm -> Pretty.T list
    22   val pretty_goals_without_context: thm -> Pretty.T list
       
    23   val pretty_goal: {main: bool, limit: bool} -> Proof.context -> thm -> Pretty.T
    23 end;
    24 end;
    24 
    25 
    25 structure Goal_Display: GOAL_DISPLAY =
    26 structure Goal_Display: GOAL_DISPLAY =
    26 struct
    27 struct
    27 
    28 
   146 fun pretty_goals_without_context th =
   147 fun pretty_goals_without_context th =
   147   let val ctxt =
   148   let val ctxt =
   148     Config.put show_main_goal true (Syntax.init_pretty_global (Thm.theory_of_thm th))
   149     Config.put show_main_goal true (Syntax.init_pretty_global (Thm.theory_of_thm th))
   149   in pretty_goals ctxt th end;
   150   in pretty_goals ctxt th end;
   150 
   151 
       
   152 fun pretty_goal {main, limit} ctxt th =
       
   153   Pretty.chunks (pretty_goals
       
   154     (ctxt
       
   155       |> Config.put show_main_goal main
       
   156       |> not limit ? Config.put goals_limit (Thm.nprems_of th)
       
   157       |> Config.put goals_total false) th);
       
   158 
   151 end;
   159 end;
   152 
   160 
   153 end;
   161 end;
   154 
   162