277 State (SOME (Theory (Context.Theory (Runtime.controlled_execution NONE f ()), NONE)), NONE) |
277 State (SOME (Theory (Context.Theory (Runtime.controlled_execution NONE f ()), NONE)), NONE) |
278 | apply_tr _ Exit (State (SOME (state as Theory (Context.Theory _, _)), _)) = |
278 | apply_tr _ Exit (State (SOME (state as Theory (Context.Theory _, _)), _)) = |
279 exit_transaction state |
279 exit_transaction state |
280 | apply_tr int (Keep f) state = |
280 | apply_tr int (Keep f) state = |
281 Runtime.controlled_execution (try generic_theory_of state) (fn x => tap (f int) x) state |
281 Runtime.controlled_execution (try generic_theory_of state) (fn x => tap (f int) x) state |
282 | apply_tr int (Transaction (f, g)) (State (SOME state, _)) = |
282 | apply_tr int (Transaction (f, g)) (State (SOME node, _)) = |
283 apply_transaction (fn x => f int x) g state |
283 apply_transaction (fn x => f int x) g node |
284 | apply_tr _ _ _ = raise UNDEF; |
284 | apply_tr _ _ _ = raise UNDEF; |
285 |
285 |
286 fun apply_union _ [] state = raise FAILURE (state, UNDEF) |
286 fun apply_union _ [] state = raise FAILURE (state, UNDEF) |
287 | apply_union int (tr :: trs) state = |
287 | apply_union int (tr :: trs) state = |
288 apply_union int trs state |
288 apply_union int trs state |