-- 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.2 module NumHask.Hedgehog.Gen -- | a rational-style random variate rational :: (ToRatio a Integer, FromRatio a Integer, MonadGen m) => Range a -> m a -- | a rational style random variate utilising Bounds rational_ :: (Additive a, Bounded a, ToRatio a Integer, FromRatio a Integer, MonadGen m) => m a -- | an integral-type random variate integral :: (ToIntegral a Integer, -- FromIntegral a Integer, MonadGen m) => Range.Range a -> m a integral :: (MonadGen m, FromInteger a, ToInteger a) => 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 Integer, FromRatio a Integer, MonadGen m) => m a -- | a uniform distribution between -1 and 1 negUniform :: (Field a, ToRatio a Integer, FromRatio a Integer, MonadGen m) => m a -- | a pair genPair :: Monad m => m a -> m (Pair a) -- | Space genRange :: forall a m. (Ord a, MonadGen m) => m a -> m (Range a) genRangePos :: forall a m. (Ord 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, Bounded a, Subtractive a) => Gen a -> Property toFromRatio :: (Eq a, Show a, FromRatio a Integer, ToRatio a Integer) => Gen a -> Property toFromIntegral :: (Eq a, Show a, FromIntegral a Integer, ToIntegral a Integer) => 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 = (Ord a, Fractional 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, LowerBoundedField a, UpperBoundedField a) => a -> Gen a -> Property isDistributiveTimesPlus :: 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. (Fractional (Element s), Show s, Space s) => (s -> s -> s) -> Element s -> Gen s -> Property isAssociativeSpace :: forall s. (Fractional (Element s), Show s, Space s) => (s -> s -> s) -> Element s -> Gen s -> Property isUnitalSpace :: forall s. (Fractional (Element s), Show s, Space s) => s -> (s -> s -> s) -> Element s -> Gen s -> Property isLatticeSpace :: forall s. (Show s, Space s, JoinSemiLattice (Element s), MeetSemiLattice (Element 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. (Fractional (Element s), Show s, Space s) => Element s -> Gen s -> Property isProjectiveLower :: forall s. (FieldSpace s, Epsilon (Element s), Ord (Element s), Fractional (Element s), Show s) => Element s -> Gen s -> Property isProjectiveUpper :: forall s. (FieldSpace s, Epsilon (Element s), Ord (Element s), Fractional (Element s), Show s) => Gen s -> Property instance (GHC.Classes.Ord a, NumHask.Algebra.Abstract.Additive.Additive a) => NumHask.Algebra.Abstract.Additive.Additive (NumHask.Space.Range.Range a) instance (GHC.Classes.Ord a, NumHask.Algebra.Abstract.Additive.Subtractive a) => NumHask.Algebra.Abstract.Additive.Subtractive (NumHask.Space.Range.Range a) instance (GHC.Classes.Ord a, NumHask.Algebra.Abstract.Multiplicative.Multiplicative a) => NumHask.Algebra.Abstract.Multiplicative.Multiplicative (NumHask.Space.Range.Range a) instance (GHC.Classes.Ord a, NumHask.Algebra.Abstract.Field.LowerBoundedField a, NumHask.Algebra.Abstract.Field.UpperBoundedField a, NumHask.Analysis.Metric.Epsilon a, NumHask.Algebra.Abstract.Multiplicative.Divisive a) => NumHask.Algebra.Abstract.Multiplicative.Divisive (NumHask.Space.Range.Range a) module NumHask.Hedgehog.Props integralProps :: forall a. (Show a, Distributive a, Subtractive a, Integral a, Signed a, Bounded a, Normed a a, Metric a a, JoinSemiLattice a, FromIntegral a Integer, ToIntegral a Integer) => Gen a -> [(PropertyName, Property)] integralUnboundedProps :: forall a. (Show a, Distributive a, Subtractive a, Signed a, Normed a a, Metric a a, JoinSemiLattice a) => Gen a -> [(PropertyName, Property)] naturalProps :: forall a. (Show a, Distributive 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, Signed a, Normed a a, Metric a a, JoinSemiLattice a, FromRatio a Integer, ToRatio a Integer) => Gen a -> [(PropertyName, Property)] -- | field laws fieldProps :: forall a. (CanMeasure 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), LowerBoundedField (Complex a), UpperBoundedField (Complex a), FromRational a) => Complex a -> Gen (Complex a) -> [(PropertyName, Property)] -- | field laws logFieldProps :: forall a. (CanMeasure a, LowerBoundedField a, UpperBoundedField a) => Gen a -> [(PropertyName, Property)] module NumHask.Hedgehog