random-names-0.1.0.0: Expose Random and Arbitrary instances

Safe HaskellNone
LanguageHaskell2010

System.Random.NameCase

Description

Expose newtypes of Text to make program tokens

In this module, We represent the very easy operational semantics on the documents with ↓

small = a..z

large = A..Z

num = 0..9

alpha = small | large

alphaNum = alpha | num

symbol = ! | " | # | $ | % | & | | ( | ) | * | + | | | ' | - | . | / | : | ; | = | | ? | @ | [ | | ] | ^ | _ | ` | { | | | } | ~

Synopsis

Documentation

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