[GHC] #1349: Generalise the ! and UNPACK mechanism for data types, to unpack function arguments

GHC cvs-ghc at haskell.org
Fri May 14 09:58:01 EDT 2010


#1349: Generalise the ! and UNPACK mechanism for data types, to unpack function
arguments
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:              
        Type:  task              |       Status:  new         
    Priority:  normal            |    Milestone:  6.12.3      
   Component:  Compiler          |      Version:  6.6.1       
    Keywords:                    |   Difficulty:  Unknown     
          Os:  Unknown/Multiple  |     Testcase:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by tibbe):

 I tried to manually unpack the arguments like so:

 {{{
 newtype Builder = Builder {
      runBuilder :: forall s. (A.MArray s Word16 -> Int# -> Int# -> Int#
                               -> ST s [S.Text])
                 -> A.MArray s Word16 -> Int# -> Int# -> Int#
                 -> ST s [S.Text]
    }
 }}}

 However, GHC still still generates a new closure each time around the loop
 so perhaps unpacking will not help in my case.

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


More information about the Glasgow-haskell-bugs mailing list