X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcCanonical.lhs;h=60d1836ee1a82bcc3ee9d6b011b464b44432ca26;hb=492303f32eb179c14a095aa175541bdbff486179;hp=7fdb63ed855ea8e19260c204282fcd42319baa23;hpb=62f76a3cbced691b60f511fb83547a5d62653252;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcCanonical.lhs b/compiler/typecheck/TcCanonical.lhs index 7fdb63e..60d1836 100644 --- a/compiler/typecheck/TcCanonical.lhs +++ b/compiler/typecheck/TcCanonical.lhs @@ -320,7 +320,10 @@ happen. newSCWorkFromFlavored :: EvVar -> CtFlavor -> Class -> [Xi] -> TcS CanonicalCts -- Returns superclasses, see Note [Adding superclasses] newSCWorkFromFlavored ev orig_flavor cls xis - = do { let (tyvars, sc_theta, _, _) = classBigSig cls + | isEmptyVarSet (tyVarsOfTypes xis) + = return emptyCCan + | otherwise + = do { let (tyvars, sc_theta, _, _) = classBigSig cls sc_theta1 = substTheta (zipTopTvSubst tyvars xis) sc_theta ; sc_vars <- zipWithM inst_one sc_theta1 [0..] ; mkCanonicals flavor sc_vars }