Commit 0beb82c1 authored by's avatar

Avoid running afoul of the zipTvSubst check.

addDataConStupidTheta includes comments that the types list
might be longer than the tvs list. And the check in zipTvSubst
doesn't appear to be terribly recent. I am utterly flummoxed
as to why this worked before. It was clearly just broken.
And now it's fixed.
parent 685398eb
......@@ -1017,7 +1017,8 @@ 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 = zipTvSubst (dataConUnivTyVars data_con) inst_tys
univ_tvs = dataConUnivTyVars data_con
tenv = zipTvSubst univ_tvs (takeList univ_tvs inst_tys)
-- NB: inst_tys can be longer than the univ tyvars
-- because the constructor might have existentials
inst_theta = substTheta tenv stupid_theta
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