| Copyright | © 2022–2025 Jonathan Knowles |
|---|---|
| License | Apache-2.0 |
| Safe Haskell | None |
| Language | Haskell2010 |
Test.QuickCheck.Classes.Monoid.Monus
Description
This module provides Laws definitions for classes exported by
Data.Monoid.Monus.
Documentation
monusLaws :: (Arbitrary a, Show a, Eq a, Monus a) => Proxy a -> Laws Source #
overlappingGCDMonoidLaws :: (Arbitrary a, Show a, Eq a, OverlappingGCDMonoid a) => Proxy a -> Laws Source #
Laws for instances of OverlappingGCDMonoid.
Includes the following laws:
Reductivity
isJust(stripSuffix(overlapa b) a)
isJust(stripPrefix(overlapa b) b)
Idempotence
overlapa a==a
Identity
overlapmemptya==mempty
overlapamempty==mempty
Equivalences
overlapa b<>stripPrefixOverlapa b==b
stripSuffixOverlapb a<>overlapa b==a
stripOverlapa b&\(_, x, _) -> x==overlapa b
stripOverlapa b&\(_, _, x) -> x==stripPrefixOverlapa b
stripOverlapa b&\(x, _, _) -> x==stripSuffixOverlapb a
Note that the following superclass laws are not included: