[GHC] #14369: GHC warns an injective type family "may not be injective"

GHC ghc-devs at haskell.org
Thu Oct 19 14:26:12 UTC 2017


#14369: GHC warns an injective type family "may not be injective"
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.1
  checker)                           |             Keywords:
      Resolution:                    |  InjectiveFamilies
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Poor/confusing    |  Unknown/Multiple
  error message                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4106
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ryan Scott <ryan.gl.scott@…>):

 In [changeset:"8846a7fdcf2060dd37e66b4d1f89bd8fdfad4620/ghc"
 8846a7fd/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="8846a7fdcf2060dd37e66b4d1f89bd8fdfad4620"
 Fix #14369 by making injectivity warnings finer-grained

 Summary:
 Previously, GHC would always raise the possibility that a
 type family might not be injective in certain error messages, even if
 that type family actually //was// injective. Fix this by actually
 checking for a type family's lack of injectivity before emitting
 such an error message.

 Test Plan: ./validate

 Reviewers: goldfire, austin, bgamari, simonpj

 Reviewed By: simonpj

 Subscribers: simonpj, rwbarton, thomie

 GHC Trac Issues: #14369

 Differential Revision: https://phabricator.haskell.org/D4106
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14369#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list