equal
deleted
inserted
replaced
563 | combinator (Select_Goals n) = |
563 | combinator (Select_Goals n) = |
564 COMBINATOR1 (fn method => preparation THEN RESTRICT_GOAL 1 n method); |
564 COMBINATOR1 (fn method => preparation THEN RESTRICT_GOAL 1 n method); |
565 |
565 |
566 in |
566 in |
567 |
567 |
568 fun evaluate text static_ctxt = |
568 fun evaluate text ctxt0 facts = |
569 let |
569 let |
570 fun eval0 m = |
570 val ctxt = set_facts facts ctxt0; |
571 Seq.single #> Seq.maps_results (fn (ctxt, st) => m (get_facts ctxt) (ctxt, st)); |
571 fun eval0 m = Seq.single #> Seq.maps_results (m facts); |
572 fun eval (Basic m) = eval0 (m static_ctxt) |
572 fun eval (Basic m) = eval0 (m ctxt) |
573 | eval (Source src) = eval0 (method_cmd static_ctxt src static_ctxt) |
573 | eval (Source src) = eval0 (method_cmd ctxt src ctxt) |
574 | eval (Combinator (_, c, txts)) = combinator c (map eval txts); |
574 | eval (Combinator (_, c, txts)) = combinator c (map eval txts); |
575 val method = eval text; |
575 in eval text o Seq.Result end; |
576 in fn facts => fn (ctxt, st) => method (Seq.Result (set_facts facts ctxt, st)) end; |
|
577 |
576 |
578 end; |
577 end; |
579 |
578 |
580 |
579 |
581 |
580 |