[GHC] #6018: Injective type families

GHC ghc-devs at haskell.org
Fri Mar 6 15:50:48 UTC 2015


#6018: Injective type families
-------------------------------------+-------------------------------------
        Reporter:  lunaris           |                   Owner:  jstolarek
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.4.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |  TypeFamilies, Injective
 Type of failure:  None/Unknown      |            Architecture:
      Blocked By:                    |  Unknown/Multiple
 Related Tickets:  #4259             |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:  Phab:D202
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Replying to [comment:109 jstolarek]:
 > (I am assuming that also `->` classifies type families although, as you
 point out, this is not entirely accurate.)

 Right -- `->` does '''not''' classify type families in Haskell today. The
 only place where `->` describes a type family is in the output of GHCi's
 `:kind` operator. And, to get that to work, GHC has a gross hack in that
 GHCi relaxes the "type families must always be saturated" requirement,
 just to appease users who want to know the shape of their type families.
 (This gross hack is a great idea from a user's point of view, and I'm not
 at all suggesting removing it. But it is gross from a type system point of
 view.)

 Nowhere in a Haskell source text can `->` classify a type family. So, I
 think that fact describes the difference between our comments above.

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


More information about the ghc-tickets mailing list