Read instance of StdGen returns no parse

Denis Bueno dbueno at
Sat Jan 26 15:21:00 EST 2008

Hi all,

According to
the Read StdGen instance should never fail.  However, in GHC 6.8.2, it
appears to:

> ghci
GHCi, version 6.8.2:  :? for help
Loading package base ... linking ... done.
Prelude> :m System.Random
Prelude System.Random> read "exsqueeze me" :: StdGen
Loading package old-locale- ... linking ... done.
Loading package old-time- ... linking ... done.
Loading package random- ... linking ... done.
*** Exception: no parse
Prelude System.Random> Leaving GHCi.

It first fails for me on strings of length seven.  Is this a bug, or
have I done something wrong?


More information about the Glasgow-haskell-users mailing list