[GHC] #10482: Not enough unboxing happens on data-family function argument

GHC ghc-devs at haskell.org
Fri Jun 26 07:32:43 UTC 2015


#10482: Not enough unboxing happens on data-family function argument
-------------------------------------+-------------------------------------
        Reporter:  akio              |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"0b7e538a09bc958474ec704063eaa08836e9270e/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="0b7e538a09bc958474ec704063eaa08836e9270e"
 Allow recursive unwrapping of data families

 When doing strictness analysis, we need to look inside products.
 To avoid unpacking infinitely, we must be careful about
 infinite types.  That in turn is controlled by TyCon.checkRecTc.

 For data families like
    data instance T (a,b) = MkT a (T b)
 we want to unpack the thing recursively for types like
   T (Int, (Int, (Int, Int)))

 This patch elaborates the checkRecTc mechanism in TyCon, to
 maintain a *count* of how many times a TyCon has shown up,
 rather than just a boolean.

 A simple change, and a useful one.  Fixes Trac #10482.
 }}}

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


More information about the ghc-tickets mailing list