random-names-0.1.0.0: Expose Random and Arbitrary instances

Safe HaskellNone
LanguageHaskell2010

System.Random.NameCase.Combinators

Description

Please see NameCase

Synopsis

Documentation

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

Like elements and System.Random.randomR'. Get a element from `[a]`, using a value of `Random Int`, the `(a, a)`, and the `a -> Int`.

`elementsR visibleChars ord (x, y)`

errorOnUnexpected :: String -> String -> a Source #

Break the program. Notify that an error on unexpected conditions.

newtype VisibleChar Source #

Similar to 'VisibleChar, but only visible and ascii characters are allowed in the Random and the Arbitrary instances

Constructors

VisibleChar 

Fields

pattern AlphaNums :: [Char] -> List' AlphaNumChar Source #

>>> xs = AlphaNums ['A', 'b', '3']
>>> :t xs
List' AlphaNumChar
>>> AlphaNums xs' = xs
>>> :t xs'
[Char]

unAlphaNums :: List' AlphaNumChar -> [Char] Source #

The dual of AlphaNums, This is imposed the same restriction of AlphaNums to the return type

pattern Symbols :: [Char] -> List' SymbolChar Source #

Similar to AlphaNums

newtype List' a Source #

A workaround for the Random orphan instance

Constructors

List' 

Fields

Instances

Functor List' Source # 

Methods

fmap :: (a -> b) -> List' a -> List' b #

(<$) :: a -> List' b -> List' a #

Bounded a => Bounded (List' a) Source # 

Methods

minBound :: List' a #

maxBound :: List' a #

(Bounded a, Random a) => Random (List' a) Source # 

Methods

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

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

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

randoms :: RandomGen g => g -> [List' a] #

randomRIO :: (List' a, List' a) -> IO (List' a) #

randomIO :: IO (List' a) #

newtype Text' Source #

A workaround for the Random orphan instance

Constructors

Text' 

Fields

Instances

Bounded Text' Source # 
Random Text' Source # 

Methods

randomR :: RandomGen g => (Text', Text') -> g -> (Text', g) #

random :: RandomGen g => g -> (Text', g) #

randomRs :: RandomGen g => (Text', Text') -> g -> [Text'] #

randoms :: RandomGen g => g -> [Text'] #

randomRIO :: (Text', Text') -> IO Text' #

randomIO :: IO Text' #