-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Laws and tests for numhask -- -- Laws and tests for numhask. @package numhask-hedgehog @version 0.3 module NumHask.Hedgehog.Gen -- | a rational-style random variate rational :: (ToRatio a, FromRatio a, MonadGen m) => Range a -> m a -- | a rational style random variate utilising Bounds rational_ :: (Additive a, Bounded a, ToRatio a, FromRatio a, MonadGen m) => m a -- | an integral-stype random variate integral :: (ToInteger a, FromInteger a, MonadGen m) => Range a -> m a -- | an integral-style random variate utilising Bounds integral_ :: (Additive a, Bounded a, ToInteger a, FromInteger a, MonadGen m) => m a -- | a uniform distribution between zero and one uniform :: (Field a, ToRatio a, FromRatio a, MonadGen m) => m a -- | a uniform distribution between -1 and 1 negUniform :: (Field a, ToRatio a, FromRatio a, Subtractive a, MonadGen m) => m a -- | a pair genPair :: Monad m => m a -> m (Pair a) -- | Space genRange :: forall a m. (JoinSemiLattice a, MeetSemiLattice a, MonadGen m) => m a -> m (Range a) genRangePos :: forall a m. (JoinSemiLattice a, MeetSemiLattice a, MonadGen m) => m a -> m (Range a) -- | a complex random variate genComplex :: Monad m => m a -> m (Complex a) module NumHask.Hedgehog.Prop -- | running tests in parallel assertProps :: GroupName -> TestLimit -> Gen a -> (Gen a -> [(PropertyName, Property)]) -> IO Bool -- | run tests sequentially assertPropsSeq :: GroupName -> TestLimit -> Gen a -> (Gen a -> [(PropertyName, Property)]) -> IO Bool -- | Combinator for a property of involving a single element unary :: Show a => Gen a -> (a -> Bool) -> Property -- | Combinator for a property involving two elements binary :: Show a => Gen a -> (a -> a -> Bool) -> Property -- | Combinator for a property involving three elements ternary :: Show a => Gen a -> (a -> a -> a -> Bool) -> Property isIdempotent :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property isCommutative :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property isUnital :: (Eq a, Show a) => a -> (a -> a -> a) -> Gen a -> Property isAssociative :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property isAdditive :: (Eq a, Show a, Additive a) => Gen a -> [(PropertyName, Property)] isGroup :: (Eq a, Show a) => a -> (a -> a -> a) -> (a -> a -> a) -> (a -> a) -> Gen a -> Property isSubtractive :: (Eq a, Show a, Subtractive a) => Gen a -> [(PropertyName, Property)] isMultiplicative :: (Eq a, Show a, Multiplicative a) => Gen a -> [(PropertyName, Property)] isDivisive :: (Eq a, Show a, Divisive a) => Gen a -> [(PropertyName, Property)] isDistributive :: (Eq a, Show a) => a -> (a -> a -> a) -> (a -> a -> a) -> Gen a -> Property isAbsorbativeUnit :: (Eq a, Show a) => a -> (a -> a -> a) -> Gen a -> Property isAbsorbative :: (Eq a, Show a) => (a -> a -> a) -> (a -> a -> a) -> Gen a -> Property isIntegral :: (Eq a, Show a, Integral a) => Gen a -> Property isFromIntegral :: (Eq a, Show a, FromInteger a, ToInteger a) => Gen a -> Property isRational :: (Eq a, Show a, FromRatio a, ToRatio a) => Gen a -> Property isSigned :: (Eq a, Show a, Signed a) => Gen a -> Property isNormed :: forall a b. (JoinSemiLattice b, Show a, Normed a b) => [b] -> Gen a -> Property isNormedBounded :: forall a. (JoinSemiLattice a, Bounded a, Show a, Normed a a) => Gen a -> Property isNormedUnbounded :: forall a. (JoinSemiLattice a, Show a, Normed a a) => Gen a -> Property isMetricBounded :: forall a. (JoinSemiLattice a, Bounded a, Additive a, Show a, Metric a a) => Gen a -> Property isMetricUnbounded :: forall a. (JoinSemiLattice a, Additive a, Show a, Metric a a) => Gen a -> Property isUpperBoundedField :: forall a. (Eq a, UpperBoundedField a, Show a) => Gen a -> Property isLowerBoundedField :: forall a. (Eq a, LowerBoundedField a, Show a) => Gen a -> Property isQuotientIntegerField :: forall a. (JoinSemiLattice a, FromInteger a, QuotientField a Integer, Show a) => Gen a -> Property isExpField :: forall a. (Ord a, Epsilon a, ExpField a, Show a, Normed a a) => Gen a -> Property isSemiring :: (Eq a, Show a, Distributive a) => Gen a -> [(PropertyName, Property)] isRing :: (Eq a, Show a, Distributive a, Subtractive a) => Gen a -> [(PropertyName, Property)] isStarSemiring :: (Eq a, Show a, StarSemiring a) => Gen a -> Property isInvolutive :: forall a. (Eq a, Show a, InvolutiveRing a) => Gen a -> Property module NumHask.Hedgehog.Prop.Space type CanMeasure a = (Lattice a, Multiplicative a, Show a, Epsilon a) isIdempotent :: forall a. CanMeasure a => (Range a -> Range a -> Range a) -> a -> Gen a -> Property isCommutative :: forall a. CanMeasure a => (a -> a -> a) -> (Range a -> Range a -> Range a) -> a -> Gen a -> Property isUnital :: forall a. CanMeasure a => a -> (a -> a -> a) -> a -> Gen a -> Property isAssociative :: forall a. CanMeasure a => (a -> a -> a) -> (Range a -> Range a -> Range a) -> a -> Gen a -> Property isAdditive :: forall a. CanMeasure a => a -> Gen a -> [(PropertyName, Property)] isSubtractive :: forall a. CanMeasure a => a -> Gen a -> Property isMultiplicative :: forall a. CanMeasure a => a -> Gen a -> [(PropertyName, Property)] isDivisive :: forall a. (CanMeasure a, BoundedLattice a, Divisive a) => a -> Gen a -> Property isDistributiveTimesPlus :: forall a. CanMeasure a => a -> Gen a -> Property isDistributiveJoinMeet :: forall a. CanMeasure a => a -> Gen a -> Property isZeroAbsorbative :: forall a. CanMeasure a => (a -> a -> a) -> a -> Gen a -> Property isAbsorbative :: forall a. CanMeasure a => (a -> a -> a) -> (a -> a -> a) -> (Range a -> Range a -> Range a) -> (Range a -> Range a -> Range a) -> a -> Gen a -> Property isSigned :: forall a. (CanMeasure a, Signed a) => a -> Gen a -> Property isNormedUnbounded :: forall a. (CanMeasure a, Normed a a) => a -> Gen a -> Property isMetricUnbounded :: forall a. (CanMeasure a, Metric a a) => a -> Gen a -> Property isExpField :: forall a. (CanMeasure a, ExpField a, Signed a) => a -> Gen a -> Property isCommutativeSpace :: forall s. (Epsilon (Element s), Multiplicative (Element s), Show s, Space s) => (s -> s -> s) -> Element s -> Gen s -> Property isAssociativeSpace :: forall s. (Epsilon (Element s), Multiplicative (Element s), Show s, Space s) => (s -> s -> s) -> Element s -> Gen s -> Property isUnitalSpace :: forall s. (Epsilon (Element s), Multiplicative (Element s), Show s, Space s) => s -> (s -> s -> s) -> Element s -> Gen s -> Property isLatticeSpace :: forall s. (Show s, Space s) => Gen s -> Property isSubtractiveSpace :: forall s. (Space s, Subtractive s, Eq s, CanMeasure (Element s), Show s) => Gen s -> Property isDivisiveSpace :: forall s. (Space s, Divisive s, Eq s, CanMeasure (Element s), Show s) => Gen s -> Property isContainedUnion :: forall s. (Epsilon (Element s), Multiplicative (Element s), Show s, Space s) => Element s -> Gen s -> Property isProjectiveLower :: forall s. (FieldSpace s, Epsilon (Element s), Show s) => Element s -> Gen s -> Property isProjectiveUpper :: forall s. (FieldSpace s, Epsilon (Element s), Show s) => Gen s -> Property module NumHask.Hedgehog.Props integralProps :: forall a. (Show a, Distributive a, Subtractive a, Integral a, FromInteger a, ToInteger a, Signed a, Bounded a, Normed a a, Metric a a, JoinSemiLattice a) => Gen a -> [(PropertyName, Property)] integralUnboundedProps :: forall a. (Show a, Distributive a, Subtractive a, Integral a, FromInteger a, ToInteger a, Signed a, Normed a a, Metric a a, JoinSemiLattice a) => Gen a -> [(PropertyName, Property)] naturalProps :: forall a. (Show a, Distributive a, Integral a, FromInteger a, ToInteger a, Signed a, Normed a a, JoinSemiLattice a) => Gen a -> [(PropertyName, Property)] boolProps :: forall a. (Show a, Ord a, Distributive a) => Gen a -> [(PropertyName, Property)] rationalProps :: forall a. (Show a, Ord a, Distributive a, Subtractive a, Divisive a, FromRatio a, ToRatio a, Signed a, Normed a a, Metric a a, JoinSemiLattice a) => Gen a -> [(PropertyName, Property)] -- | field laws fieldProps :: forall a. (CanMeasure a, BoundedLattice a, LowerBoundedField a, UpperBoundedField a, Signed a, Normed a a, Metric a a) => Gen a -> [(PropertyName, Property)] -- | quotient field laws quotientFieldProps :: forall a. (CanMeasure a, FromInteger a, QuotientField a Integer) => Gen a -> [(PropertyName, Property)] complexFieldProps :: forall a. (CanMeasure (Complex a), Epsilon a, BoundedLattice (Complex a), Divisive a, FromRatio a) => Complex a -> Gen (Complex a) -> [(PropertyName, Property)] -- | field laws logFieldProps :: forall a. (CanMeasure a, BoundedLattice a, Divisive a) => Gen a -> [(PropertyName, Property)] -- | lattice laws latticeProps :: forall a. CanMeasure a => Gen a -> [(PropertyName, Property)] -- | space laws spaceProps :: forall s. (Show s, Space s, Monoid s, Eq s, Epsilon (Element s), LowerBoundedField (Element s), UpperBoundedField (Element s), BoundedJoinSemiLattice (Element s), BoundedMeetSemiLattice (Element s)) => Gen s -> [(PropertyName, Property)] -- | space laws fieldSpaceProps :: forall s. (Show s, FieldSpace s, Epsilon (Element s)) => Gen s -> [(PropertyName, Property)] -- | Interval algebra is not distributive spaceAlgebraProps :: forall s. (Eq s, Show s, Space s, Subtractive s, Divisive s, CanMeasure (Element s)) => Gen s -> [(PropertyName, Property)] module NumHask.Hedgehog