-- default types from the envt;
-- i.e. use the curent ones
-- (the caller will put them back there)
-- default types from the envt;
-- i.e. use the curent ones
-- (the caller will put them back there)
; let deflt_clss | ovl_str = [num_class, is_str_class]
| otherwise = [num_class]
; let deflt_clss | ovl_str = [num_class, is_str_class]
| otherwise = [num_class]
tc_default_ty deflt_clss hs_ty
= do { ty <- tcHsSigType DefaultDeclCtxt hs_ty
; checkTc (isTauTy ty) (polyDefErr hs_ty)
tc_default_ty deflt_clss hs_ty
= do { ty <- tcHsSigType DefaultDeclCtxt hs_ty
; checkTc (isTauTy ty) (polyDefErr hs_ty)
= do { (_, mb_res) <- tryTc (tcSimplifyDefault [mkClassPred cls [ty]])
; return (isJust mb_res) }
= do { (_, mb_res) <- tryTc (tcSimplifyDefault [mkClassPred cls [ty]])
; return (isJust mb_res) }
- = hang (ptext SLIT("The default type") <+> quotes (ppr ty) <+> ptext SLIT("is not an instance of"))
- 2 (foldr1 (\a b -> a <+> ptext SLIT("or") <+> b) (map (quotes. ppr) deflt_clss))
+ = hang (ptext (sLit "The default type") <+> quotes (ppr ty) <+> ptext (sLit "is not an instance of"))
+ 2 (foldr1 (\a b -> a <+> ptext (sLit "or") <+> b) (map (quotes. ppr) deflt_clss))