equal
deleted
inserted
replaced
370 fun transaction f thy = |
370 fun transaction f thy = |
371 let |
371 let |
372 val {name, generation} = get_info thy; |
372 val {name, generation} = get_info thy; |
373 val copy_thy = |
373 val copy_thy = |
374 thy |
374 thy |
375 |> Theory.prep_ext |
375 |> Theory.copy |
376 |> Theory.add_name ("#" ^ name ^ ":" ^ string_of_int generation) (* FIXME !!?? *) |
376 |> Theory.add_name ("#" ^ name ^ ":" ^ string_of_int generation) (* FIXME !!?? *) |
377 |> put_info {name = name, generation = generation + 1}; |
377 |> put_info {name = name, generation = generation + 1}; |
378 val (thy', opt_exn) = (transform_error f thy, None) handle exn => (thy, Some exn); |
378 val (thy', opt_exn) = (transform_error f thy, None) handle exn => (thy, Some exn); |
379 in |
379 in |
380 if Sign.is_stale (Theory.sign_of thy') then raise ROLLBACK (copy_thy, opt_exn) |
380 if Sign.is_stale (Theory.sign_of thy') then raise ROLLBACK (copy_thy, opt_exn) |