[GHC] #12057: TypeFamilyDependencies on Data.Type.Bool's `Not`

GHC ghc-devs at haskell.org
Wed May 25 21:15:21 UTC 2016


#12057: TypeFamilyDependencies on   Data.Type.Bool's `Not`
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  libraries/base    |              Version:  8.0.1
      Resolution:                    |             Keywords:  TypeFamilies,
                                     |  Injective, newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Iceland_jack):

 Replying to [comment:3 RyanGlScott]:
 > `Rep` definitely isn't injective. Counterexample: `Rep (Proxy Int)` =
 `Rep (Proxy Char)`, but `Int` is not `Char`.

 Interesting, thank you. Would this be covered by the weaker
 [https://ghc.haskell.org/trac/ghc/ticket/6018#comment:48
 ‘head’-injectivity]?

 Is there any benefit from adding this distinguishing information/kind
 information to the metadata (since `Proxy` is polykinded)?

 I am perversely working backwards from the perspective of injectivity but
 there may be a use for `TypeRep`s in the `Rep`.

 > `Not` can certainly be made injective though, and this would be simple
 to do and useful. Would you care to make a patch for it?

 Sure, it can be kept open for more injective type families in base.

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


More information about the ghc-tickets mailing list