[GHC] #5916: runST isn't free

GHC cvs-ghc at haskell.org
Thu Mar 8 09:18:39 CET 2012


#5916: runST isn't free
---------------------------------+------------------------------------------
    Reporter:  tibbe             |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.4.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj):

 This is wrong I think, `runSTRep` is `NOINLINE`:
 {{{
     {-# NOINLINE runSTRep #-}
     runSTRep :: (forall s. STRep s a) -> a
     runSTRep st_rep = case st_rep realWorld# of
         (# _, r #) -> r
 }}}
 We thus need to create a closure containing the arguments to `$wupdate'`
 and give it as an argument to `runSTRep`.

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



More information about the Glasgow-haskell-bugs mailing list