diff --git a/src/HOL/Library/adhoc_overloading.ML b/src/HOL/Library/adhoc_overloading.ML --- a/src/HOL/Library/adhoc_overloading.ML +++ b/src/HOL/Library/adhoc_overloading.ML @@ -56,8 +56,12 @@ (* generic data *) +fun type_eq pT = + let val matches = can (fn pT => Type.raw_match pT Vartab.empty) + in matches pT andalso matches (swap pT) end; + fun variants_eq ((v1, T1), (v2, T2)) = - Term.aconv_untyped (v1, v2) andalso T1 = T2; + Term.aconv_untyped (v1, v2) andalso type_eq (T1, T2); structure Overload_Data = Generic_Data (