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

Safe HaskellSafe-Inferred
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

Show a => Show (NonEmpty a) 
Typeable (* -> *) NonEmpty 

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) 
Ord a => Ord (Nat a) 
Show a => Show (Nat a) 
Typeable (* -> *) Nat 

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) 
Ord a => Ord (NonZero a) 
Show a => Show (NonZero a) 
Typeable (* -> *) NonZero 

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
 

printables :: [Printable] -> String Source

Access function for printable ASCII strings