| Copyright | © 2022 Jonathan Knowles |
|---|---|
| License | Apache-2.0 |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Test.QuickCheck.Classes.Monoid.GCD
Description
This module provides Laws definitions for classes exported by
Data.Monoid.GCD.
Synopsis
- gcdMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, GCDMonoid a) => Proxy a -> Laws
- cancellativeGCDMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, Cancellative a, GCDMonoid a) => Proxy a -> Laws
- leftGCDMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, LeftGCDMonoid a) => Proxy a -> Laws
- rightGCDMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, RightGCDMonoid a) => Proxy a -> Laws
- overlappingGCDMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, OverlappingGCDMonoid a) => Proxy a -> Laws
Documentation
gcdMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, GCDMonoid a) => Proxy a -> Laws Source #
cancellativeGCDMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, Cancellative a, GCDMonoid a) => Proxy a -> Laws Source #
leftGCDMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, LeftGCDMonoid a) => Proxy a -> Laws Source #
Laws for instances of LeftGCDMonoid.
Tests the following laws:
stripCommonPrefixa b&\(p, _, _) -> p==commonPrefixa b
stripCommonPrefixa b&\(p, x, _) -> p<>x==a
stripCommonPrefixa b&\(p, _, x) -> p<>x==b
stripCommonPrefixa b&\(p, x, _) ->Justx==stripPrefixp a
stripCommonPrefixa b&\(p, _, x) ->Justx==stripPrefixp b
Note that the following superclass laws are not included:
rightGCDMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, RightGCDMonoid a) => Proxy a -> Laws Source #
Laws for instances of RightGCDMonoid.
Tests the following laws:
stripCommonSuffixa b&\(_, _, s) -> s==commonSuffixa b
stripCommonSuffixa b&\(x, _, s) -> x<>s==a
stripCommonSuffixa b&\(_, x, s) -> x<>s==b
stripCommonSuffixa b&\(x, _, s) ->Justx==stripSuffixs a
stripCommonSuffixa b&\(_, x, s) ->Justx==stripSuffixs b
Note that the following superclass laws are not included:
overlappingGCDMonoidLaws :: forall a. (Arbitrary a, Show a, Eq a, OverlappingGCDMonoid a) => Proxy a -> Laws Source #
Laws for instances of OverlappingGCDMonoid.
Tests the following laws:
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: