
#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 RyanGlScott): Replying to [comment:2 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`.
Do you mind explaining your reasoning for in a little more detail? Because it's not cleat at all to me why making `r1 ~ 'IntRep` would cause `r2` to default to `PtrRepLifted`. In particular, I would have expected: {{{#!hs (#,#) Int# :: forall (r2 :: RuntimeRep). TYPE r2 -> TYPE 'UnboxedTupleRep }}} Why would it default with an argument, but not without arguments? Also, do you know what's going on with: {{{ λ> :k $(unboxedTupleT 2) $(unboxedTupleT 2) :: * -> * -> TYPE 'UnboxedTupleRep }}} Is Template Haskell causing some defaulting behavior that I'm not aware of? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12976#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler