src/Pure/pure_thy.ML
changeset 6574 a91b4cfd3104
parent 6560 1436349f8b28
child 6660 6e17d06007d2
equal deleted inserted replaced
6573:0fc9763762be 6574:a91b4cfd3104
   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)