+check_instance :: Type -> Class -> TcM Bool
+ -- Check that ty is an instance of cls
+ -- We only care about whether it worked or not; return a boolean
+check_instance ty cls
+ = do { (_, mb_res) <- tryTc (tcSimplifyDefault [mkClassPred cls [ty]])
+ ; return (isJust mb_res) }
+
+defaultDeclCtxt = ptext SLIT("When checking the types in a default declaration")