Commit 6344b150 authored by's avatar
Browse files

Fix Trac #2478

A minor glitch that shows up only when a data constructor has *both* a
"stupid theta" in the data type decl, *and* an existential type variable.
parent e8d4ca74
......@@ -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
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