quickcheck-special-0.1.0.6: Edge cases and special values for QuickCheck Arbitrary instances

Test.QuickCheck.Special

Description

The standard Arbitrary instances don't generate special values. This is fixed by this package which provides the newtype Special with an Arbitrary instance. The special values are given by the SpecialValues typeclass.

Synopsis

# Documentation

newtype Special a Source #

Additionally to the standard Arbitrary instances, this generates special values with a small probability.

Constructors

 Special FieldsgetSpecial :: a

Instances

 Source # Methodsfmap :: (a -> b) -> Special a -> Special b #(<\$) :: a -> Special b -> Special a # Bounded a => Bounded (Special a) Source # Methods Enum a => Enum (Special a) Source # Methodssucc :: Special a -> Special a #pred :: Special a -> Special a #toEnum :: Int -> Special a #fromEnum :: Special a -> Int #enumFrom :: Special a -> [Special a] #enumFromThen :: Special a -> Special a -> [Special a] #enumFromTo :: Special a -> Special a -> [Special a] #enumFromThenTo :: Special a -> Special a -> Special a -> [Special a] # Eq a => Eq (Special a) Source # Methods(==) :: Special a -> Special a -> Bool #(/=) :: Special a -> Special a -> Bool # Integral a => Integral (Special a) Source # Methodsquot :: Special a -> Special a -> Special a #rem :: Special a -> Special a -> Special a #div :: Special a -> Special a -> Special a #mod :: Special a -> Special a -> Special a #quotRem :: Special a -> Special a -> (Special a, Special a) #divMod :: Special a -> Special a -> (Special a, Special a) #toInteger :: Special a -> Integer # Num a => Num (Special a) Source # Methods(+) :: Special a -> Special a -> Special a #(-) :: Special a -> Special a -> Special a #(*) :: Special a -> Special a -> Special a #negate :: Special a -> Special a #abs :: Special a -> Special a #signum :: Special a -> Special a # Ord a => Ord (Special a) Source # Methodscompare :: Special a -> Special a -> Ordering #(<) :: Special a -> Special a -> Bool #(<=) :: Special a -> Special a -> Bool #(>) :: Special a -> Special a -> Bool #(>=) :: Special a -> Special a -> Bool #max :: Special a -> Special a -> Special a #min :: Special a -> Special a -> Special a # Read a => Read (Special a) Source # MethodsreadsPrec :: Int -> ReadS (Special a) # Real a => Real (Special a) Source # Methods Show a => Show (Special a) Source # MethodsshowsPrec :: Int -> Special a -> ShowS #show :: Special a -> String #showList :: [Special a] -> ShowS # (Arbitrary a, SpecialValues a) => Arbitrary (Special a) Source # Methodsarbitrary :: Gen (Special a) #shrink :: Special a -> [Special a] # Source # Methodscoarbitrary :: Special a -> Gen b -> Gen b #

class SpecialValues a where #

Provides a list of special values or edge cases

Minimal complete definition

specialValues

Methods

specialValues :: [a] #

Finite list of special values

Instances

 MethodsspecialValues :: [Bool] # MethodsspecialValues :: [Char] # MethodsspecialValues :: [Double] # MethodsspecialValues :: [Float] # MethodsspecialValues :: [Int] # MethodsspecialValues :: [Int8] # MethodsspecialValues :: [Int16] # MethodsspecialValues :: [Int32] # MethodsspecialValues :: [Int64] # Methods Methods MethodsspecialValues :: [Word] # MethodsspecialValues :: [Word8] # MethodsspecialValues :: [Word16] # MethodsspecialValues :: [Word32] # MethodsspecialValues :: [Word64] # MethodsspecialValues :: [()] # Methods Methods Methods Methods MethodsspecialValues :: [Text] # MethodsspecialValues :: [Text] # SpecialValues a => SpecialValues [a] MethodsspecialValues :: [[a]] # MethodsspecialValues :: [Maybe a] # (SpecialValues a, SpecialValues b) => SpecialValues (Either a b) MethodsspecialValues :: [Either a b] # (SpecialValues a, SpecialValues b) => SpecialValues (a, b) MethodsspecialValues :: [(a, b)] #