Iain Barnett wrote:
Hi,
I have a function, that produces a random number between two given numbers
rand :: Int - Int - IO Int
rand low high = getStdRandom (randomR (low,high))
(Naively) I'd like to write something like
take (rand 1 10 ) [1..10]
and see [1,2,3,4] ... or anything but nasty
forgot return, of course:
myTake :: IO [Int]
myTake = do
n - rand 1 10
return $ take n [1..10]
Lev Walkin wrote:
Iain Barnett wrote:
Hi,
I have a function, that produces a random number between two given
numbers
rand :: Int - Int - IO Int
rand low high = getStdRandom (randomR
This solution seem to provide a practical alternative to pusing
datatypes for streaming XML.
http://gemo.futurs.inria.fr/events/PLANX2008/papers/p10.pdf
Lev Walkin wrote:
Marc A. Ziegert wrote:
We don't know of a good way to fix this problem. I'm going to
record this example in a ticket
Lev Walkin wrote:
Simon Marlow wrote:
Lev Walkin wrote:
I wondered why would a contemporary GHC 6.8.3 exhibit such a leak?
After all, the technique was known in 2000 (and afir by Wadler in '87)
and one would assume Joe English's reference to most other Haskell
systems ought to mean GHC
/haskell-1990-2000/msg06086.html
but my version is a bit more self-sufficient for the new folks who'd
like to quickly test it on their system.
Am I really ignorant of some important GHC optimization options
(tried -O2/-O3), or is this indeed a serious problem to tackle?
--
Lev Walkin
[EMAIL
Simon Marlow wrote:
Lev Walkin wrote:
I wondered why would a contemporary GHC 6.8.3 exhibit such a leak?
After all, the technique was known in 2000 (and afir by Wadler in '87)
and one would assume Joe English's reference to most other Haskell
systems ought to mean GHC.
Thanks for this nice