On 29/12/2011 20:39, Jerzy Karczmarczuk wrote:
Still, I dont understand what does S.H. mean by a "perfectly good
pure generator".
Tell more please (unless you just mean a stream, say:
Probably bad wording, to be honest. I only meant that there's random
number handling support in the Haskell library and, and least judging by
type signatures, it's pure functional code with no hint of the IO monad.
AFAIK there's no hidden unsafePerformIO sneaking any entropy in behind
the scenes. Even if there was, it might be a legitimate reason for
unsafePerformIO - random numbers are in principle non-deterministic, not
determined by the current state of the outside world and
which-you-evaluate-first should be irrelevant. If you have a quantum
genuine-random-numbers gadget, the IO monad might be considered
redundant for functions that get values from it - though it still isn't
referentially transparent as it returns a different value each time even
with the same parameters.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe