Injective type families imply nominal injectivity, but NOT rep inj
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Mon, 27 Feb 2017 05:10:15 +0000 (21:10 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 2 Mar 2017 23:58:51 +0000 (15:58 -0800)
Test Plan: validate

Reviewers: simonpj, austin, jstolarek, bgamari, goldfire

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3223

compiler/types/TyCon.hs

index f98da7b..99a20af 100644 (file)
@@ -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