Expand Template Haskell type splices before quantification
Consider
f :: Int -> $(foo)
f = ...
This is a Template Haskell type splice. What if $(foo)
expands to a -> a
. Then it should all behave as if you'd written
f :: Int -> a -> a
f = ...
But it doesn't, because we collect the variables over which we will implicitly quantify before expanding splices.
This is made yet more tricky when we add type wildcards to the mix.
And really there is no good reason for this trouble. We should simply expand the splice, and then decide what to quantify over. A little bit of refactoring in RnTypes
.
This ticket is just to record that I intend to do this shortly.
It's possible that #11098 (closed) is related; I'm not sure.