+tc_defaults decls
+ = failWithTc (dupDefaultDeclErr decls)
+
+
+defaultDeclCtxt = ptext SLIT("when checking that each type in a default declaration")
+ $$ ptext SLIT("is an instance of class Num")
+
+
+dupDefaultDeclErr (DefaultDecl _ locn1 : dup_things)
+ = vcat (item1 : map dup_item dup_things)
+ where
+ item1
+ = addShortErrLocLine locn1 (ptext SLIT("multiple default declarations"))
+
+ dup_item (DefaultDecl _ locn)
+ = addShortErrLocLine locn (ptext SLIT("here was another default declaration"))