[GHC] #12976: GHCi displays the kinds of unboxed tuples incorrectly

GHC ghc-devs at haskell.org
Wed Dec 14 22:13:43 UTC 2016


#12976: GHCi displays the kinds of unboxed tuples incorrectly
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  GHCi              |              Version:  8.0.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 I say that this behavior is correct. As you report, the kind of `(#,#)` is
 `forall (r1 :: RuntimeRep) (r2 :: RuntimeRep). TYPE r1 -> TYPE r2 -> TYPE
 'UnboxedTupleRep`. So once you provide a type argument (`(#,#) Int#`),
 then GHC must supply both `RuntimeRep` arguments. The second one defaults
 to `PtrRepLifted`. At the term level, we can then regeneralize, but you
 can't do that in types because there is no type-level lambda.

 An alternative to the current design would be to have

 {{{
 (#,#) :: forall (r1 :: RuntimeRep). TYPE r1 -> forall (r2 :: RuntimeRep).
 TYPE r2 -> TYPE 'UnboxedTupleRep`
 }}}

 This is an improvement from a technical standpoint, but I wager humans
 would be even more confused here.

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


More information about the ghc-tickets mailing list