[GHC] #5323: Add ($!!) and force to deepseq

GHC cvs-ghc at haskell.org
Fri Jul 15 00:55:12 CEST 2011


#5323: Add ($!!) and force to deepseq
---------------------------------+------------------------------------------
    Reporter:  ivanm             |       Owner:                   
        Type:  feature request   |      Status:  new              
    Priority:  normal            |   Component:  libraries (other)
     Version:  7.0.3             |    Keywords:                   
    Testcase:                    |   Blockedby:                   
          Os:  Unknown/Multiple  |    Blocking:                   
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown     
---------------------------------+------------------------------------------
 For the related discussion on libraries@, please see
 http://www.haskell.org/pipermail/libraries/2011-July/016540.html

 The result of the discussion was that $!! should be added to deepseq:
 {{{
 ($!!) :: (NFData a) => (a -> b) ->a -> b
 f $!! x = x `deepseq` f x

 infixr 0 $!!
 }}}

 Also, that force should be added but with suitable documentation to
 indicate possible ways in which it may behave other than as you'd expect:
 {{{
 force :: (NFData a) => a -> a
 force x = x `deepseq` x
 }}}

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



More information about the Glasgow-haskell-bugs mailing list