#2470: read for StdGen fails for arbitrary string
------------------------------+---------------------------------------------
 Reporter:  guest             |          Owner:         
     Type:  bug               |         Status:  closed 
 Priority:  normal            |      Milestone:         
Component:  libraries/random  |        Version:  6.8.3  
 Severity:  normal            |     Resolution:  invalid
 Keywords:  StdGen read       |     Difficulty:  Unknown
 Testcase:                    |   Architecture:  x86    
       Os:  Windows           |  
------------------------------+---------------------------------------------
Comment (by ross):

 Replying to [comment:2 igloo]:
 > Strings that are the result of showing a StdGen work fine as part of
 structures [...]
 >
 > For reading a random string you can use `reads` to avoid the exception.

 The description quoted in the bug report, including "It guarantees to
 succeed on any string" is in the Haskell 98 Report.  Not implementing that
 would be a bug, wouldn't it?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2470#comment:5>
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