System.Random.TF.Instances

tf-random-0.5: High-quality splittable pseudorandom number generator

Copyright | (c) 2012-2013 Michał Pałka
License | BSD3
Maintainer | michal.palka@chalmers.se
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell98

System.Random.TF.Instances

Description

This module defines alternative `Random` instances for common integral types, which make use of the `RandomGen` class from System.Random.TF.Gen.

# Documentation

class Random a where

Minimal complete definition

randomR, random

Methods

randomR :: RandomGen g => (a, a) -> g -> (a, g)

random :: RandomGen g => g -> (a, g)

randomRs :: RandomGen g => (a, a) -> g -> [a]

randoms :: RandomGen g => g -> [a]

Instances

Random Bool |
Random Char |
Random Int |
Random Int8 |
Random Int16 |
Random Int32 |
Random Int64 |
Random Integer |
Random Word8 |
Random Word16 |
Random Word32 |
Random Word64 |

randomEnum :: (Enum a, RandomGen g) => (a, a) -> g -> (a, g)