
19 Mar
2007
19 Mar
'07
9:50 a.m.
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