src/HOL/Tools/datatype_codegen.ML
changeset 28054 2b84d34c5d02
parent 27398 768da1da59d6
child 28083 103d9282a946
equal deleted inserted replaced
28053:a2106c0d8c45 28054:2b84d34c5d02
   447         val thm' = singleton (ProofContext.export lthy' ctxt_thy) thm;
   447         val thm' = singleton (ProofContext.export lthy' ctxt_thy) thm;
   448       in (thm', lthy') end;
   448       in (thm', lthy') end;
   449     fun tac thms = Class.intro_classes_tac []
   449     fun tac thms = Class.intro_classes_tac []
   450       THEN ALLGOALS (ProofContext.fact_tac thms);
   450       THEN ALLGOALS (ProofContext.fact_tac thms);
   451     fun get_eq' thy dtco = get_eq thy dtco
   451     fun get_eq' thy dtco = get_eq thy dtco
   452       |> map (CodeUnit.constrain_thm [HOLogic.class_eq])
   452       |> map (Code_Unit.constrain_thm [HOLogic.class_eq])
   453       |> map Simpdata.mk_eq
   453       |> map Simpdata.mk_eq
   454       |> map (MetaSimplifier.rewrite_rule [Thm.transfer thy @{thm equals_eq}]);
   454       |> map (MetaSimplifier.rewrite_rule [Thm.transfer thy @{thm equals_eq}]);
   455     fun add_eq_thms dtco thy =
   455     fun add_eq_thms dtco thy =
   456       let
   456       let
   457         val thy_ref = Theory.check_thy thy;
   457         val thy_ref = Theory.check_thy thy;