src/Pure/Interface/proof_general.ML
changeset 7939 131a2c54036f
parent 7937 82025fe607d3
child 7954 ea6b79f32cfd
equal deleted inserted replaced
7938:e45599caee6c 7939:131a2c54036f
    92 
    92 
    93 (* theory / proof state output *)
    93 (* theory / proof state output *)
    94 
    94 
    95 fun print_current_goals n max th = plain_writeln (Goals.print_current_goals_default n max) th;
    95 fun print_current_goals n max th = plain_writeln (Goals.print_current_goals_default n max) th;
    96 
    96 
    97 fun setup_state isar =
    97 fun setup_state () =
    98   (current_goals_markers :=
    98  (current_goals_markers :=
    99     let
    99     let
   100       val begin_state = oct_char "366";
   100       val begin_state = oct_char "366";
   101       val end_state= oct_char "367";
   101       val end_state= oct_char "367";
   102       val begin_goal = oct_char "370";
   102       val begin_goal = oct_char "370";
   103     in (begin_state, end_state, begin_goal) end;
   103     in (begin_state, end_state, begin_goal) end;
   104   if isar then
   104   Toplevel.print_state_fn := plain_writeln Toplevel.print_state_default;
   105    (Toplevel.print_state_fn := plain_writeln Toplevel.print_state_default;
   105   Toplevel.prompt_state_fn := (suffix (oct_char "372") o Toplevel.prompt_state_default);
   106     Toplevel.prompt_state_fn := (suffix (oct_char "372") o Toplevel.prompt_state_default))
   106   Goals.print_current_goals_fn := print_current_goals);
   107   else ();
       
   108   Goals.print_current_goals_fn := print_current_goals);  (*isar: avoids verbose responses*)
       
   109 
   107 
   110 
   108 
   111 (* theory loader actions *)
   109 (* theory loader actions *)
   112 
   110 
   113 local
   111 local
   160 
   158 
   161 local
   159 local
   162 
   160 
   163 fun restart isar =
   161 fun restart isar =
   164  (ThyInfo.touch_all_thys ();
   162  (ThyInfo.touch_all_thys ();
   165   if isar then () else (ml_prompts ("> " ^ oct_char "372") ("- " ^ oct_char "373"); kill_goal ());
   163   if isar then tell_clear_goals () else kill_goal ();
   166   tell_clear_response ();
   164   tell_clear_response ();
   167   writeln (Session.welcome ()));
   165   writeln (Session.welcome ()));
   168 
   166 
   169 in
   167 in
   170 
   168 
   202 
   200 
   203 (* init *)
   201 (* init *)
   204 
   202 
   205 fun init isar =
   203 fun init isar =
   206  (setup_messages ();
   204  (setup_messages ();
   207   setup_state isar;
   205   setup_state ();
   208   setup_thy_loader ();
   206   setup_thy_loader ();
   209   print_mode := [proof_generalN];
   207   print_mode := [proof_generalN];
   210   set quick_and_dirty;
   208   set quick_and_dirty;
   211   if isar then init_outer_syntax () else ();
   209   if isar then init_outer_syntax () else ();
       
   210   ml_prompts ("> " ^ oct_char "372") ("- " ^ oct_char "373");
   212   if isar then Isar.sync_main () else isa_restart ());
   211   if isar then Isar.sync_main () else isa_restart ());
   213 
   212 
   214 
   213 
   215 
   214 
   216 (** generate keyword classification file **)
   215 (** generate keyword classification file **)