[GHC] #13294: compactResize is a terrible primop and a terrible name

GHC ghc-devs at haskell.org
Sat Feb 18 01:18:16 UTC 2017


#13294: compactResize is a terrible primop and a terrible name
-------------------------------------+-------------------------------------
           Reporter:  ezyang         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Core           |           Version:  8.1
  Libraries                          |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 compactResize does two things: it changes the default block allocation
 size of a compact region, and appends a new block to the compact region.

 There are two problems with this function: first, it's terribly named; it
 doesn't actually do any resizing of the existing compact region to speak
 of.  Second, there arguably isn't any reason why it should append a new
 block to the compact region; just let that happen automatically!

 But I'm not actually using compact regions for anything real. Simon
 Marlow, do you know why you moved compactResize from Data.Compact.Internal
 to Data.Compact? If there is some functionality in it that is useful for
 end users we should articulate it properly. I'm happy to do the docfixes.

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


More information about the ghc-tickets mailing list