#1665: rnf should work for any value or rnf should be implemented in the 
compiler
--------------------------------+-------------------------------------------
  Reporter:  [EMAIL PROTECTED]  |          Owner:         
      Type:  feature request    |         Status:  new    
  Priority:  normal             |      Milestone:         
 Component:  Compiler           |        Version:  6.7    
  Severity:  normal             |       Keywords:         
Difficulty:  Unknown            |             Os:  Unknown
  Testcase:                     |   Architecture:  Unknown
--------------------------------+-------------------------------------------
Currently rnf is implemented in a type class NFData in
 Control.Parallel.Strategies. This is not general enough, since it doesn't
 work for values that only exist in a monad. E.g. something built in the ST
 monad that uses unsafeInterleaveST cannot be converted to head normal form
 via rnf, since it cannot return a "Done" value, only a ST s Done value.

 A solution would be to have the function rnf implemented in the compiler.
 Its specification would be to evaluate its argument to head normal form
 and then return it. This is much more convenient to users, since they
 don't need to implement the boiler-plate code for every data type
 encountered.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1665>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to