Commit 02b4845e authored by eir@cis.upenn.edu's avatar eir@cis.upenn.edu
Browse files

Consider equality contexts exotic, uninferrable by "deriving"

See comments in #8984. This takes back the fix for #6088.
parent 5b8fa46c
......@@ -878,10 +878,8 @@ validDerivPred :: TyVarSet -> PredType -> Bool
validDerivPred tv_set pred
= case classifyPredType pred of
ClassPred _ tys -> check_tys tys
-- EqPred ReprEq is a Coercible constraint; treat
-- like a class
EqPred ReprEq ty1 ty2 -> check_tys [ty1, ty2]
TuplePred ps -> all (validDerivPred tv_set) ps
EqPred {} -> False -- reject equality constraints
_ -> True -- Non-class predicates are ok
where
check_tys tys = hasNoDups fvs
......
......@@ -194,7 +194,6 @@ test('T6152',
run_command,
['$MAKE -s --no-print-directory T6152'])
test('T6088', normal, compile, [''])
test('T7082', normal, compile, [''])
test('Overlap1', normal, compile, [''])
......
T6088.hs:16:33:
Couldn't match type ‘Pos n’ with ‘True’
When deriving the instance for (C (B n))
......@@ -132,3 +132,5 @@ test('T9580', normal, multimod_compile_fail, ['T9580', ''])
test('T9662', normal, compile_fail, [''])
test('T7862', normal, compile_fail, [''])
test('T9896', normal, compile_fail, [''])
test('T6088', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment