summaryrefslogtreecommitdiff
path: root/compiler/types/OptCoercion.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2015-06-15 17:02:36 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2015-06-16 14:22:52 -0400
commit7eceffb3dd1e9c99218630b94ba97da483cec32d (patch)
tree52c735a85877a48dd25aed8ec9654ed62104df7c /compiler/types/OptCoercion.hs
parentf1080035c6ca959f3bf261133ab256f72d56c997 (diff)
downloadhaskell-7eceffb3dd1e9c99218630b94ba97da483cec32d.tar.gz
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).
Diffstat (limited to 'compiler/types/OptCoercion.hs')
-rw-r--r--compiler/types/OptCoercion.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs
index 49217de4b1..35d178122f 100644
--- a/compiler/types/OptCoercion.hs
+++ b/compiler/types/OptCoercion.hs
@@ -701,7 +701,7 @@ etaTyConAppCo_maybe tc (TyConAppCo _ tc2 cos2)
= ASSERT( tc == tc2 ) Just cos2
etaTyConAppCo_maybe tc co
- | isDecomposableTyCon tc
+ | mightBeUnsaturatedTyCon tc
, Pair ty1 ty2 <- coercionKind co
, Just (tc1, tys1) <- splitTyConApp_maybe ty1
, Just (tc2, tys2) <- splitTyConApp_maybe ty2