Refactor handling of decomposition.
authorRichard Eisenberg <eir@cis.upenn.edu>
Mon, 15 Jun 2015 21:02:36 +0000 (17:02 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Tue, 16 Jun 2015 18:22:52 +0000 (14:22 -0400)
commit7eceffb3dd1e9c99218630b94ba97da483cec32d
tree52c735a85877a48dd25aed8ec9654ed62104df7c
parentf1080035c6ca959f3bf261133ab256f72d56c997
Refactor handling of decomposition.

This adds the significant Note [Decomposing equalities] to
TcCanonical, trying to sort out the various cases involved.

The only functional change this commit should make is a different
treatment of data families, which were wrong before (they could
be decomposed at role R, which is wrong).
compiler/coreSyn/CoreLint.hs
compiler/typecheck/TcCanonical.hs
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcUnify.hs
compiler/types/Coercion.hs
compiler/types/OptCoercion.hs
compiler/types/TyCon.hs
compiler/types/Type.hs
testsuite/tests/typecheck/should_compile/RepArrow.hs [new file with mode: 0644]