Make simplifyInfer generalise only over simple class constraints
So we never infer f :: Eq (Tree a) => blah when there isn't an instance for Eq (Tree a). This fixes Trac #6022. It does represent a change in behaviour: certain (bizarre) programs will be rejected that were previously accepted. Specifically, if you have module A where f x = ...somethign needing (C T)... moudule B where import A instance C T test = f True Here the (C T) instance is provided "later". But this is wierd; it would be better to give a type signature for f f :: C T => Bool -> Bool and then you'd be fine.
Loading
Please register or sign in to comment