[GHC] #9097: Change GHC.Exts.Any to a type family

GHC ghc-devs at haskell.org
Wed Jun 11 14:02:16 UTC 2014


#9097: Change GHC.Exts.Any to a type family
-------------------------------------------------+-------------------------
        Reporter:  goldfire                      |            Owner:
            Type:  task                          |  goldfire
        Priority:  high                          |           Status:
       Component:  Compiler                      |  closed
      Resolution:  fixed                         |        Milestone:
Operating System:  Unknown/Multiple              |  7.10.1
 Type of failure:  None/Unknown                  |          Version:  7.8.2
       Test Case:  indexed-                      |         Keywords:
  types/should_fail/T9097                        |     Architecture:
        Blocking:                                |  Unknown/Multiple
                                                 |       Difficulty:
                                                 |  Unknown
                                                 |       Blocked By:
                                                 |  Related Tickets:
-------------------------------------------------+-------------------------

Comment (by goldfire):

 You're absolutely right that the diffs don't cover this -- that's because
 the explanation was already there:

 {{{
 Note [Any types]
 ~~~~~~~~~~~~~~~~
 The type constructor Any of kind forall k. k has these properties:
 ...
   * It is a *closed* type family, with no instances.  This means that
     if   ty :: '(k1, k2)  we add a given coercion
              g :: ty ~ (Fst ty, Snd ty)
     If Any was a *data* type, then we'd get inconsistency because 'ty'
     could be (Any '(k1,k2)) and then we'd have an equality with Any on
     one side and '(,) on the other. See also #9097.
 ...
 }}}

 It seems that this comment was left when you reverted the last time you
 made this change. Well, it's now correct again.

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


More information about the ghc-tickets mailing list