Safe Haskell | None |
---|---|
Language | Haskell98 |
- class PropertyList l where
- propertyList :: Desc -> l -> Property (PropertyListType l)
- combineProperties :: Desc -> l -> Property (PropertyListType l)
- type family PropertyListType t
Documentation
class PropertyList l where Source
propertyList :: Desc -> l -> Property (PropertyListType l) Source
Combines a list of properties, resulting in a single property that when run will run each property in the list in turn, and print out the description of each as it's run. Does not stop on failure; does propigate overall success/failure.
Note that Property HasInfo and Property NoInfo are not the same
type, and so cannot be mixed in a list. To make a list of
mixed types, which can also include RevertableProperty,
use props
:
propertyList "foo" $ props & someproperty ! oldproperty & otherproperty
combineProperties :: Desc -> l -> Property (PropertyListType l) Source
Combines a list of properties, resulting in one property that ensures each in turn. Stops if a property fails.
type family PropertyListType t Source
Type level function to calculate whether a PropertyList has Info.
type PropertyListType PropList = HasInfo | |
type PropertyListType [Property NoInfo] = NoInfo | |
type PropertyListType [Property HasInfo] = HasInfo |