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

#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

#13294: compactResize is a terrible primop and a terrible name -------------------------------------+------------------------------------- Reporter: ezyang | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Core Libraries | 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: | -------------------------------------+------------------------------------- Changes (by ezyang): * cc: simonmar (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13294#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13294: compactResize is a terrible primop and a terrible name -------------------------------------+------------------------------------- Reporter: ezyang | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Core Libraries | 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 simonmar): Yes, I completely agree. I didn't look at this operation much during my recent overhaul, and I'm not using it. I don't remember why I moved it. Feel free to make it better. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13294#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC