testing-type-modifiers-0.1.0.0: Data type modifiers for property based testing

Safe HaskellSafe
LanguageHaskell2010

Data.Modifiers

Contents

Description

Type modifiers for writing properties that quantify over commonly used subsets of standard types. | | Currently there are only a few modifiers, more will be added.

Synopsis

List modifiers

newtype NonEmpty a Source

A type of non empty lists such that nonEmpty xs /= [] .

Constructors

NonEmpty 

Fields

nonEmpty :: [a]
 

Instances

mkNonEmpty :: a -> [a] -> NonEmpty a Source

Numeric modifiers

newtype Nat a Source

A type of natural numbers such that nat a >= 0 .

Constructors

Nat 

Fields

nat :: a
 

Instances

Eq a => Eq (Nat a) Source 
Ord a => Ord (Nat a) Source 
Show a => Show (Nat a) Source 

newtype NonZero a Source

A type of non-zero integers such that nonZero a /= 0 .

Constructors

NonZero 

Fields

nonZero :: a
 

Instances

Eq a => Eq (NonZero a) Source 
Ord a => Ord (NonZero a) Source 
Show a => Show (NonZero a) Source 

Character and string modifiers

newtype Unicode Source

Any unicode character. Should contain all values of the Char type.

Constructors

Unicode 

Fields

unicode :: Char
 

unicodes :: [Unicode] -> String Source

Access function for unicode strings.

newtype Printable Source

Printable ASCII characters.

Constructors

Printable 

Fields

printable :: Char
 

Instances

printables :: [Printable] -> String Source

Access function for printable ASCII strings