X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcPat.lhs;h=2e865835b66bfedbecceb0616b6c65fc66e3dac7;hb=8e2cb328ca9f2303e7e11874e50421aa18914101;hp=6a30754dd12a1a23365173a1c8dcd7aefd3aec97;hpb=9e8ed75238e8b9456de540b07db5adf8ce7fb116;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcPat.lhs b/compiler/typecheck/TcPat.lhs index 6a30754..2e86583 100644 --- a/compiler/typecheck/TcPat.lhs +++ b/compiler/typecheck/TcPat.lhs @@ -799,7 +799,9 @@ addDataConStupidTheta data_con inst_tys -- The origin should always report "occurrence of C" -- even when C occurs in a pattern stupid_theta = dataConStupidTheta data_con - tenv = zipTopTvSubst (dataConUnivTyVars data_con) inst_tys + tenv = mkTopTvSubst (dataConUnivTyVars data_con `zip` inst_tys) + -- NB: inst_tys can be longer than the univ tyvars + -- because the constructor might have existentials inst_theta = substTheta tenv stupid_theta \end{code}