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 Source #

Minimal complete definition

randomR, random

Methods

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

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

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

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

#### Instances

Instances details

Random Int16 Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Int16, Int16) -> g -> (Int16, g) Source # random :: RandomGen g => g -> (Int16, g) Source # randomRs :: RandomGen g => (Int16, Int16) -> g -> [Int16] Source # randoms :: RandomGen g => g -> [Int16] Source #
Random Int32 Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Int32, Int32) -> g -> (Int32, g) Source # random :: RandomGen g => g -> (Int32, g) Source # randomRs :: RandomGen g => (Int32, Int32) -> g -> [Int32] Source # randoms :: RandomGen g => g -> [Int32] Source #
Random Int64 Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Int64, Int64) -> g -> (Int64, g) Source # random :: RandomGen g => g -> (Int64, g) Source # randomRs :: RandomGen g => (Int64, Int64) -> g -> [Int64] Source # randoms :: RandomGen g => g -> [Int64] Source #
Random Int8 Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Int8, Int8) -> g -> (Int8, g) Source # random :: RandomGen g => g -> (Int8, g) Source # randomRs :: RandomGen g => (Int8, Int8) -> g -> [Int8] Source # randoms :: RandomGen g => g -> [Int8] Source #
Random Word16 Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Word16, Word16) -> g -> (Word16, g) Source # random :: RandomGen g => g -> (Word16, g) Source # randomRs :: RandomGen g => (Word16, Word16) -> g -> [Word16] Source # randoms :: RandomGen g => g -> [Word16] Source #
Random Word32 Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Word32, Word32) -> g -> (Word32, g) Source # random :: RandomGen g => g -> (Word32, g) Source # randomRs :: RandomGen g => (Word32, Word32) -> g -> [Word32] Source # randoms :: RandomGen g => g -> [Word32] Source #
Random Word64 Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Word64, Word64) -> g -> (Word64, g) Source # random :: RandomGen g => g -> (Word64, g) Source # randomRs :: RandomGen g => (Word64, Word64) -> g -> [Word64] Source # randoms :: RandomGen g => g -> [Word64] Source #
Random Word8 Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Word8, Word8) -> g -> (Word8, g) Source # random :: RandomGen g => g -> (Word8, g) Source # randomRs :: RandomGen g => (Word8, Word8) -> g -> [Word8] Source # randoms :: RandomGen g => g -> [Word8] Source #
Random Integer Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Integer, Integer) -> g -> (Integer, g) Source # random :: RandomGen g => g -> (Integer, g) Source # randomRs :: RandomGen g => (Integer, Integer) -> g -> [Integer] Source # randoms :: RandomGen g => g -> [Integer] Source #
Random Bool Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Bool, Bool) -> g -> (Bool, g) Source # random :: RandomGen g => g -> (Bool, g) Source # randomRs :: RandomGen g => (Bool, Bool) -> g -> [Bool] Source # randoms :: RandomGen g => g -> [Bool] Source #
Random Char Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Char, Char) -> g -> (Char, g) Source # random :: RandomGen g => g -> (Char, g) Source # randomRs :: RandomGen g => (Char, Char) -> g -> [Char] Source # randoms :: RandomGen g => g -> [Char] Source #
Random Int Source # |
Instance details Defined in System.Random.TF.Instances Methods randomR :: RandomGen g => (Int, Int) -> g -> (Int, g) Source # random :: RandomGen g => g -> (Int, g) Source # randomRs :: RandomGen g => (Int, Int) -> g -> [Int] Source # randoms :: RandomGen g => g -> [Int] Source #

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