Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- oddSpec ∷ Specification BaseFn Int
- evenSpec ∷ ∀ n. (TypeSpec BaseFn n ~ NumSpec BaseFn n, Integral n, HasSpec BaseFn n, MaybeBounded n) ⇒ Specification BaseFn n
- sum3WithLength ∷ Integer → Specification BaseFn ([Int], Int, Int, Int)
- sum3 ∷ Specification BaseFn [Int]
- listSumPair ∷ Numbery a ⇒ Specification BaseFn [(a, Int)]
- listSumForall ∷ Numbery a ⇒ Specification BaseFn [a]
- listSumComplex ∷ Numbery a ⇒ a → Specification BaseFn [a]
- data Outcome
- propYes ∷ String → Solution t → Property
- propNo ∷ Show t ⇒ String → Solution t → Property
- parensList ∷ [String] → String
- logishProp ∷ Gen Property
- picktest ∷ (Ord a, Num a) ⇒ a → a → (a → Bool) → a → Int → [a] → Bool
- pickProp ∷ Gen Property
- testFoldSpec ∷ ∀ a. (Foldy BaseFn a, Random a, Integral a, TypeSpec BaseFn a ~ NumSpec BaseFn a) ⇒ Specification BaseFn Integer → Specification BaseFn a → Specification BaseFn a → Outcome → Gen Property
- sumProp ∷ (Integral t, Random t, HasSpec BaseFn t) ⇒ t → t → Specification BaseFn t → t → Int → Outcome → Gen Property
- sumProp2 ∷ (Show t, Integral t, Random t) ⇒ t → t → (String, t → Bool) → t → Int → Outcome → Gen Property
Documentation
oddSpec ∷ Specification BaseFn Int Source #
evenSpec ∷ ∀ n. (TypeSpec BaseFn n ~ NumSpec BaseFn n, Integral n, HasSpec BaseFn n, MaybeBounded n) ⇒ Specification BaseFn n Source #
sum3WithLength ∷ Integer → Specification BaseFn ([Int], Int, Int, Int) Source #
sum3 ∷ Specification BaseFn [Int] Source #
listSumPair ∷ Numbery a ⇒ Specification BaseFn [(a, Int)] Source #
listSumForall ∷ Numbery a ⇒ Specification BaseFn [a] Source #
listSumComplex ∷ Numbery a ⇒ a → Specification BaseFn [a] Source #
Complicated, because if a
is too large, the spec is unsatisfiable.
parensList ∷ [String] → String Source #
testFoldSpec ∷ ∀ a. (Foldy BaseFn a, Random a, Integral a, TypeSpec BaseFn a ~ NumSpec BaseFn a) ⇒ Specification BaseFn Integer → Specification BaseFn a → Specification BaseFn a → Outcome → Gen Property Source #
Build properties about calls to genListWithSize
sumProp ∷ (Integral t, Random t, HasSpec BaseFn t) ⇒ t → t → Specification BaseFn t → t → Int → Outcome → Gen Property Source #
Generate a property from a call to pickAll
. We can test for success or failure using outcome
sumProp2 ∷ (Show t, Integral t, Random t) ⇒ t → t → (String, t → Bool) → t → Int → Outcome → Gen Property Source #
Like SumProp, but instead of using a (Specification fn n) for the element predicate It uses an explicit pair of a (String, n -> Bool). This means we can test things using any Haskell function.