Skip to content

Treat existentials correctly in dubiousDataConInstArgTys

Simon Peyton Jones requested to merge wip/T22849 into master

Consider

 data T a where
   MkT :: forall k (t::k->*) (ix::k). t ix -> T @k a

Then dubiousDataConInstArgTys MkT [Type, Foo] should return

[Foo (ix::Type)]

NOT

[Foo (ix::k)]

A bit of an obscure case, but it's an outright bug, and the fix is easy.

Fixes #22849 (closed)

Edited by Simon Peyton Jones

Merge request reports