read for StdGen fails for arbitrary string
|Reported by:||guest||Owned by:|
|Type of failure:||Difficulty:||Unknown|
|Test Case:||Blocked By:|
According to the docs for StdGen?:
- It guarantees to succeed on any string.
- It guarantees to consume only a finite portion of the string.
- Different argument strings are likely to result in different results."
Here's what happens on my system:
GHCi, version 6.8.3: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> :mod +System.Random
Prelude System.Random> (read "tasty tofu") :: StdGen?
Loading package old-locale-22.214.171.124 ... linking ... done.
Loading package old-time-126.96.36.199 ... linking ... done.
Loading package random-188.8.131.52 ... linking ... done.
* Exception: Prelude.read: no parse
You can contact me at orielmaxime@… if you need more information.
Change History (7)
Changed 6 years ago by guest
comment:2 follow-up: ↓ 5 Changed 6 years ago by igloo
- Difficulty set to Unknown
- Resolution set to invalid
- Status changed from new to closed