Take account of injectivity when doing fundeps
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 4 Nov 2016 10:43:36 +0000 (10:43 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 4 Nov 2016 12:32:31 +0000 (12:32 +0000)
commit2cdd9bd5208e3ad78d7a3b8b82c8ae1be486b34d
tree0bccf87de19aa17d7675630f55ada70eab765493
parent7b0ae417026c587dbc9697f678d560b1dc975d50
Take account of injectivity when doing fundeps

This fixes Trac #12803. Yikes!

See Note [Care with type functions].
compiler/prelude/TysWiredIn.hs
compiler/typecheck/FamInst.hs
compiler/typecheck/FunDeps.hs
compiler/types/Class.hs
testsuite/tests/typecheck/should_fail/T12803.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12803.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T