summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-26 21:10:15 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2017-03-02 15:58:51 -0800
commite71068617d15b0fea65fe24e20c0ab0db9fc660f (patch)
tree1b1b050af4859d5841f9ae330f713d2a218a82f8
parent984c6097c63096d10789f6eb6da6f6656195cdaf (diff)
downloadhaskell-e71068617d15b0fea65fe24e20c0ab0db9fc660f.tar.gz
Injective type families imply nominal injectivity, but NOT rep inj
Test Plan: validate Reviewers: simonpj, austin, jstolarek, bgamari, goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3223
-rw-r--r--compiler/types/TyCon.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs
index f98da7b039..99a20af1f1 100644
--- a/compiler/types/TyCon.hs
+++ b/compiler/types/TyCon.hs
@@ -1652,7 +1652,7 @@ isInjectiveTyCon (AlgTyCon {algTcRhs = rhs}) Representational
isInjectiveTyCon (SynonymTyCon {}) _ = False
isInjectiveTyCon (FamilyTyCon { famTcFlav = DataFamilyTyCon _ })
Nominal = True
-isInjectiveTyCon (FamilyTyCon { famTcInj = Injective inj }) _ = and inj
+isInjectiveTyCon (FamilyTyCon { famTcInj = Injective inj }) Nominal = and inj
isInjectiveTyCon (FamilyTyCon {}) _ = False
isInjectiveTyCon (PrimTyCon {}) _ = True
isInjectiveTyCon (PromotedDataCon {}) _ = True