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

Instances details

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

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