Partial type signatures regression around simplifiable constraints
Consider
{-# LANGUAGE FlexibleContexts, PartialTypeSignatures #-}
module Bug where
f :: Eq [a] => a -> _
f x = [x] == [x]
This program is accepted in GHC 9.0.1, but rejected by HEAD. The problem is that we get a [W] Eq [a]
from the function body, and then this is simplified to [W] Eq a
... which cannot be satisfied.
The solution, I think, is to bring Eq [a]
into scope as a Given, not a Wanted.
I have not tested it, but I smell the culprit in 5650c79e, @simonpj.