[commit: ghc] master: Injective type families imply nominal injectivity, but NOT rep inj (e710686)

git at git.haskell.org git at git.haskell.org
Thu Mar 2 23:59:24 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e71068617d15b0fea65fe24e20c0ab0db9fc660f/ghc

>---------------------------------------------------------------

commit e71068617d15b0fea65fe24e20c0ab0db9fc660f
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Sun Feb 26 21:10:15 2017 -0800

    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


>---------------------------------------------------------------

e71068617d15b0fea65fe24e20c0ab0db9fc660f
 compiler/types/TyCon.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs
index f98da7b..99a20af 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



More information about the ghc-commits mailing list