Commit 492303f3 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Fix Trac #3731: more superclass subtlety (sigh)

I will add more comments, but I want to commit this tonight,
so the overnight builds get it.
parent e491aa14
......@@ -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 }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment