src/Pure/old_goals.ML
changeset 22675 acf10be7dcca
parent 22360 26ead7ed4f4b
child 22826 0f4c501a691e
equal deleted inserted replaced
22674:1a610904bbca 22675:acf10be7dcca
   109 
   109 
   110 (*Current result maker -- set by "goal", used by "result".  *)
   110 (*Current result maker -- set by "goal", used by "result".  *)
   111 fun init_mkresult _ = error "No goal has been supplied in subgoal module";
   111 fun init_mkresult _ = error "No goal has been supplied in subgoal module";
   112 val curr_mkresult = ref (init_mkresult: bool*thm->thm);
   112 val curr_mkresult = ref (init_mkresult: bool*thm->thm);
   113 
   113 
   114 val dummy = Thm.trivial (read_cterm ProtoPure.thy ("PROP No_goal_has_been_supplied", propT));
   114 val dummy = Thm.trivial (Thm.read_cterm ProtoPure.thy ("PROP No_goal_has_been_supplied", propT));
   115 
   115 
   116 (*List of previous goal stacks, for the undo operation.  Set by setstate.
   116 (*List of previous goal stacks, for the undo operation.  Set by setstate.
   117   A list of lists!*)
   117   A list of lists!*)
   118 val undo_list = ref([[(dummy, Seq.empty)]] : gstack list);
   118 val undo_list = ref([[(dummy, Seq.empty)]] : gstack list);
   119 
   119 
   243         setmp Output.timing false (prove_goalw_cterm_general false rths chorn);
   243         setmp Output.timing false (prove_goalw_cterm_general false rths chorn);
   244 
   244 
   245 
   245 
   246 (*Version taking the goal as a string*)
   246 (*Version taking the goal as a string*)
   247 fun prove_goalw thy rths agoal tacsf =
   247 fun prove_goalw thy rths agoal tacsf =
   248   let val chorn = read_cterm thy (agoal, propT)
   248   let val chorn = Thm.read_cterm thy (agoal, propT)
   249   in prove_goalw_cterm_general true rths chorn tacsf end
   249   in prove_goalw_cterm_general true rths chorn tacsf end
   250   handle ERROR msg => cat_error msg (*from read_cterm?*)
   250   handle ERROR msg => cat_error msg (*from read_cterm?*)
   251                 ("The error(s) above occurred for " ^ quote agoal);
   251                 ("The error(s) above occurred for " ^ quote agoal);
   252 
   252 
   253 (*String version with no meta-rewrite-rules*)
   253 (*String version with no meta-rewrite-rules*)
   357 
   357 
   358 val goalw_cterm = agoalw_cterm false;
   358 val goalw_cterm = agoalw_cterm false;
   359 
   359 
   360 (*Version taking the goal as a string*)
   360 (*Version taking the goal as a string*)
   361 fun agoalw atomic thy rths agoal =
   361 fun agoalw atomic thy rths agoal =
   362     agoalw_cterm atomic rths (read_cterm thy (agoal, propT))
   362     agoalw_cterm atomic rths (Thm.read_cterm thy (agoal, propT))
   363     handle ERROR msg => cat_error msg (*from type_assign, etc via prepare_proof*)
   363     handle ERROR msg => cat_error msg (*from type_assign, etc via prepare_proof*)
   364         ("The error(s) above occurred for " ^ quote agoal);
   364         ("The error(s) above occurred for " ^ quote agoal);
   365 
   365 
   366 val goalw = agoalw false;
   366 val goalw = agoalw false;
   367 fun goal thy = goalw thy [];
   367 fun goal thy = goalw thy [];