split package:MonadRandom

Returns two distinct pseudo-random number generators. Implementations should take care to ensure that the resulting generators are not correlated. Some pseudo-random number generators are not splittable. In that case, the split implementation should fail with a descriptive error message.
Returns two distinct pseudo-random number generators. Implementations should take care to ensure that the resulting generators are not correlated.
Pseudo-random generators that can be split into two separate and independent psuedo-random generators should provide an instance for this type class. Historically this functionality was included in the RandomGen type class in the split function, however, few pseudo-random generators possess this property of splittability. This lead the old split function being usually implemented in terms of error.
The class MonadSplit proivides a way to specify a random number generator that can be split into two new generators. This class is not very useful in practice: typically, one cannot actually do anything with a generator. It remains here to avoid breaking existing code unnecessarily. For a more practically useful interface, see MonadInterleave.
The getSplit operation allows one to obtain two distinct random number generators. See split for details.