| Copyright | disco team and contributors |
|---|---|
| License | BSD-3-Clause |
| Maintainer | byorgey@gmail.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Disco.Property
Contents
Description
Properties of disco functions.
Synopsis
- generateSamples :: Member Random r => SearchType -> IEnumeration a -> Sem r ([a], SearchType)
- invertMotive :: SearchMotive -> SearchMotive
- invertPropResult :: TestResult -> TestResult
- prettyTestResult :: Members '[Input TyDefCtx, LFresh, Reader PA] r => AProperty -> TestResult -> Sem r (Doc ann)
Generation
generateSamples :: Member Random r => SearchType -> IEnumeration a -> Sem r ([a], SearchType) Source #
Select samples from an enumeration according to a search type. Also returns
a SearchType describing the results, which may be Exhaustive if the
enumeration is no larger than the number of samples requested.
Utility
invertMotive :: SearchMotive -> SearchMotive Source #
Toggles which outcome (finding or not finding the thing being searched for) qualifies as success, without changing the thing being searched for.
invertPropResult :: TestResult -> TestResult Source #
Flips the success or failure status of a PropResult, leaving
the explanation unchanged.