testing-type-modifiers-0.1.0.1: Data type modifiers for property based testing
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Modifiers

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

Instances

Instances details
Show a => Show (NonEmpty a) Source # 
Instance details

Defined in Data.Modifiers

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

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

Instances

Instances details
Show a => Show (Nat a) Source # 
Instance details

Defined in Data.Modifiers

Methods

showsPrec :: Int -> Nat a -> ShowS #

show :: Nat a -> String #

showList :: [Nat a] -> ShowS #

Eq a => Eq (Nat a) Source # 
Instance details

Defined in Data.Modifiers

Methods

(==) :: Nat a -> Nat a -> Bool #

(/=) :: Nat a -> Nat a -> Bool #

Ord a => Ord (Nat a) Source # 
Instance details

Defined in Data.Modifiers

Methods

compare :: Nat a -> Nat a -> Ordering #

(<) :: Nat a -> Nat a -> Bool #

(<=) :: Nat a -> Nat a -> Bool #

(>) :: Nat a -> Nat a -> Bool #

(>=) :: Nat a -> Nat a -> Bool #

max :: Nat a -> Nat a -> Nat a #

min :: Nat a -> Nat a -> Nat a #

newtype NonZero a Source #

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

Constructors

NonZero 

Fields

Instances

Instances details
Show a => Show (NonZero a) Source # 
Instance details

Defined in Data.Modifiers

Methods

showsPrec :: Int -> NonZero a -> ShowS #

show :: NonZero a -> String #

showList :: [NonZero a] -> ShowS #

Eq a => Eq (NonZero a) Source # 
Instance details

Defined in Data.Modifiers

Methods

(==) :: NonZero a -> NonZero a -> Bool #

(/=) :: NonZero a -> NonZero a -> Bool #

Ord a => Ord (NonZero a) Source # 
Instance details

Defined in Data.Modifiers

Methods

compare :: NonZero a -> NonZero a -> Ordering #

(<) :: NonZero a -> NonZero a -> Bool #

(<=) :: NonZero a -> NonZero a -> Bool #

(>) :: NonZero a -> NonZero a -> Bool #

(>=) :: NonZero a -> NonZero a -> Bool #

max :: NonZero a -> NonZero a -> NonZero a #

min :: NonZero a -> NonZero a -> NonZero a #

Character and string modifiers

newtype Unicode Source #

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

Constructors

Unicode 

Fields

Instances

Instances details
Show Unicode Source # 
Instance details

Defined in Data.Modifiers

Eq Unicode Source # 
Instance details

Defined in Data.Modifiers

Methods

(==) :: Unicode -> Unicode -> Bool #

(/=) :: Unicode -> Unicode -> Bool #

Ord Unicode Source # 
Instance details

Defined in Data.Modifiers

unicodes :: [Unicode] -> String Source #

Access function for unicode strings.

newtype Printable Source #

Printable ASCII characters.

Constructors

Printable 

Fields

Instances

Instances details
Show Printable Source # 
Instance details

Defined in Data.Modifiers

printables :: [Printable] -> String Source #

Access function for printable ASCII strings