RE: [Haskell-cafe] Re: System.Random StdGen read fails on some strings? [also continues: Random/StdGen/read: there is something unclear (or misunderstood!)]
Zara Good point. It's a bit stupid that 'read' fails utterly on strings shorter than 6. I don't thin StdRandom has an owner at the moment. There's a process for proposing library changes, described under guidelines for developers here http://haskell.org/haskellwiki/Libraries_and_tools That's the way to get your change adopted. However, in this case the bug is in your code. The function 'read' (which you use) fails unless it consumes its entire input. That is not what you want here. The right thing to do is to use 'reads' instead. The wrong thing to do is to make reading a StdGen read the entire input string! Simon ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: System.Random StdGen read fails on some strings? [also continues: Random/StdGen/read: there is something unclear (or misunderstood!)]
On 3/19/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote: Zara Good point. It's a bit stupid that 'read' fails utterly on strings shorter than 6. I don't thin StdRandom has an owner at the moment. There's a process for proposing library changes, described under guidelines for developers here http://haskell.org/haskellwiki/Libraries_and_tools That's the way to get your change adopted. There's already a thread about this on the libraries list: http://www.haskell.org/pipermail/libraries/2007-March/007052.html Ian commented with a proposal for fixing it, and no one has followed up yet. That would probably be a good place to direct any more discussion. Cheers, Kirsten ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe