[GHC] #11723: TYPE 'UnboxedTupleRep is a lie

GHC ghc-devs at haskell.org
Sat Mar 19 19:52:09 UTC 2016


#11723: TYPE 'UnboxedTupleRep is a lie
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
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 RyanGlScott):

 Would it be sensible to just change the constructor to:

 {{{#!hs
 data RuntimeRep
   = ...
   | UnboxedTupleRep [RuntimeRep]
 }}}

 Or if we want to avoid conflating `Void#` and `UnboxedTupleRep []`, we
 could use `UnboxedtupleRep (NonEmpty RuntimeRep)`?

 That way,

 {{{#!hs
 typeOf (Proxy :: Proxy (# Int, Int #))
 }}}

 would give

 {{{#!hs
 Proxy (TYPE ('UnboxedTupleRep '[PtrRepLifted, PtrRepLifted])) (# Int, Int
 #)
 }}}

 and thus have unambiguous size?

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


More information about the ghc-tickets mailing list