goldfirere / ghc

Mirror of ghc repository. DO NOT SUBMIT PULL REQUESTS HERE
http://www.haskell.org/ghc/
Other
25 stars 1 forks source link

Kenny's ScopedTypeVariables workaround requires help with variable ordering #47

Closed goldfirere closed 8 years ago

goldfirere commented 9 years ago

This works:

foo :: forall l a k. l ~ Maybe k => Proxy (a :: l) -> Bool
foo (_ :: Proxy (b :: j)) = undefined

But this doesn't:

foo :: l ~ Maybe k => Proxy (a :: l) -> Bool
foo (_ :: Proxy (b :: j)) = undefined

I've simply dropped the explicit quantification. GHC is guessing the wrong order?

goldfirere commented 9 years ago

See also #46.

int-index commented 8 years ago

Works on GHC 7.11.20151214.

goldfirere commented 8 years ago

Yes. It took a surprisingly large effort to sort out these sorts of problems, but I believe this class of bugs should be fixed now. Thanks for checking!