src/HOL/Tools/Quickcheck/quickcheck_common.ML
changeset 45592 8baa0b7f3f66
parent 45440 9f4d3e68ae98
child 45639 efddd75c741e
equal deleted inserted replaced
45591:4e8899357971 45592:8baa0b7f3f66
   323         val eqs_t = mk_equations consts
   323         val eqs_t = mk_equations consts
   324         val eqs = map (fn eq => Goal.prove lthy argnames [] eq
   324         val eqs = map (fn eq => Goal.prove lthy argnames [] eq
   325           (fn _ => Skip_Proof.cheat_tac (Proof_Context.theory_of lthy))) eqs_t
   325           (fn _ => Skip_Proof.cheat_tac (Proof_Context.theory_of lthy))) eqs_t
   326       in
   326       in
   327         fold (fn (name, eq) => Local_Theory.note
   327         fold (fn (name, eq) => Local_Theory.note
   328         ((Binding.conceal (Binding.qualify true prfx
   328           ((Binding.conceal
   329            (Binding.qualify true name (Binding.name "simps"))),
   329             (Binding.qualify true prfx
   330            Code.add_default_eqn_attrib :: map (Attrib.internal o K)
   330               (Binding.qualify true name (Binding.name "simps"))),
   331              [Simplifier.simp_add, Nitpick_Simps.add]), [eq]) #> snd) (names ~~ eqs) lthy
   331              Code.add_default_eqn_attrib :: @{attributes [simp, nitpick_simp]}), [eq]) #> snd)
       
   332           (names ~~ eqs) lthy
   332       end)
   333       end)
   333 
   334 
   334 (** ensuring sort constraints **)
   335 (** ensuring sort constraints **)
   335 
   336 
   336 fun perhaps_constrain thy insts raw_vs =
   337 fun perhaps_constrain thy insts raw_vs =