[GHC] #14420: Data families should not instantiate to non-Type kinds

GHC ghc-devs at haskell.org
Mon Nov 19 19:09:43 UTC 2018


#14420: Data families should not instantiate to non-Type kinds
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.3
      Resolution:                    |             Keywords:  TypeFamilies
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 monoidal):

 The definition `data Bool = False | True` defines a closed type: the only
 values of type `Bool` are `False` and `True`, pattern matching on both of
 them defines a total function. A function `Bool -> A` is equivalent to a
 tuple `(A,A)`. It's natural to expect the same behavior on the kind level:
 the promoted kind `Bool` should have only two inhabitants, type `False`
 and `True`. Currently, this doesn't hold.

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


More information about the ghc-tickets mailing list