<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">According to the documentation for System.Random (see &lt;<A href="http://haskell.org/ghc/docs/latest/html/libraries/base/System-Random.html">http://haskell.org/ghc/docs/latest/html/libraries/base/System-Random.html</A>&gt;):<DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">In addition, read may be used to map an arbitrary string (not necessarily one produced by show) onto a value of type StdGen. In general, the read instance of StdGen has the following properties:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    * <B>It guarantees to succeed on any string. </B></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    * ...</DIV></BLOCKQUOTE><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On the other hand, I get the following on the (admittedly stupid, spur-of-the-moment) String argument "whateva":</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV><BLOCKQUOTE type="cite"><DIV>Hugs&gt; :l System.Random</DIV><DIV>System.Random&gt; read "whateva" :: StdGen</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Program error: Prelude.read: no parse</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>System.Random&gt; map read $ words "this is a test of the System dot Random StdGen read, which seems to fail only on ... whateva" :: [StdGen]</DIV><DIV>[4580 1,440 1,101 1,4584 1,445 1,1485 1,35261 1,1377 1,32825 1,34047 1,13422 1,14037 1,13637 1,469 1,4132 1,4514 1,453 1,626 1,</DIV><DIV>Program error: Prelude.read: no parse</DIV></BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Am I missing something here? Or am I just being punished for the stupidity of my particular choice of String? :)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>  --  Fritz</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>PS: this happens with both Hugs Version: September 2006 and GHC Interactive, version 6.6, running on Mac/Tiger, for what that's worth.</DIV></BODY></HTML>