úÎ!ōėįv>      !"#$%&'()*+,-./0123456789:;<=Safe2quickcheck-classes*A set of laws associated with a typeclass.quickcheck-classes+Name of the typeclass whose laws are testedquickcheck-classesPairs of law name and property6>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoSafeV°quickcheck-classesTests the following p properties: Right Identityf q r "a f Left Identityr q f "a f Associativityf q (g q h) "a (f q g) q hNoteH: This property test is only available when this package is built with  base-4.9+ or transformers-0.5+.quickcheck-classesTest everything from  plus the following:  Commutativef q g "a g q fNoteH: This property test is only available when this package is built with  base-4.9+ or transformers-0.5+.SafeVŠquickcheck-classesTests the following properties: Conjunction Idempotence n .&. n "a nDisjunction Idempotence n .|. n "a nDouble Complementcomplement (complement n) "a nSet BitsetBit n i "a n .|. bit i Clear Bit'clearBit n i "a n .&. complement (bit i)Complement Bit!complementBit n i "a xor n (bit i) Clear ZeroclearBit zeroBits i "a zeroBitsSet ZerosetBit zeroBits i "a bit i Test ZerotestBit zeroBits i "a FalsePop ZeropopCount zeroBits "a 0Count Leading Zeros of Zero,countLeadingZeros zeroBits "a finiteBitSize "ĨCount Trailing Zeros of Zero-countTrailingZeros zeroBits "a finiteBitSize "Ĩ#All of the useful instances of the s typeclass also have tL instances, so these property tests actually require that instance as well.Note:2 This property test is only available when using base-4.7 or newer.SafeV tquickcheck-classesTests the following u properties: Identityv w w "a wFirst Identityx w "a wSecond Identityy w "a wBifunctor Compositionv f g "a x f z y g NoteH: This property test is only available when this package is built with  base-4.9+ or transformers-0.5+.SafeV"quickcheck-classes#Tests the following alt properties:  LiftF2 (1)({) "a liftF2 wSafeV&, quickcheck-classes+Tests the following applicative properties: Identity| w } v "a v Composition| (z) } u } v } w "a u } (v } w) Homomorphism| f } | x "a | (f x) Interchangeu } | y "a | (~ y) } u LiftA2 (1)(}) "a  w  SafeV) quickcheck-classes+Tests the following alternative properties:  Left Identity€  x "a xRight Identityx  € "a x Associativitya  (b  c) "a (a  b)  c)  SafeV+Ô quickcheck-classes#Tests the following alt properties:  Associativity(a ‚ b) ‚ c "a a ‚ (b ‚ c)Left Distributivityf ƒ (a ‚ b) "a (f ƒ a) ‚ (f ƒ b)  NoneD,„ SafeV7  quickcheck-classesTests the following properties: Succ Pred Identitysucc (pred x) "a xPred Succ Identitypred (succ x) "a xThis only works for Enum+ types that are not bounded, meaning that … and †T must be total. This means that these property tests work correctly for types like ‡ but not for ˆ.'Sadly, there is not a good way to test ‰ and Š=, since many types that have reasonable implementations for … and † have more inhabitants than ˆ does. quickcheck-classesTests the same properties as  - except that it requires the type to have a ‹u instance. These tests avoid taking the successor of the maximum element or the predecessor of the minimal element.  SafeV=Qquickcheck-classesTests the following properties:  Transitivea == b "' b == c !Ō a == c Symmetrica == b !Ō b == a Reflexivea == aûSome of these properties involve implication. In the case that the left hand side of the implication arrow does not hold, we do not retry. Consequently, these properties only end up being useful when the data type has a small number of inhabitants.SafeVFˇquickcheck-classesTests the following Œ properties: fold "a Ž wfoldMapŽ f "a  ( . f) ‘foldr f z t "a ’ (Ž (“ . f) t ) zfoldr'” f z0 xs "a let f' k x z = k • f x z in – f' w xs z0foldr1— f t "a let ˜ (xs,x) = ™ (š t) in  f x xsfoldl– f z t "a ’ (› (Ž (œ . “ .  f) t)) zfoldl'ž f z0 xs "a let f' x k z = k • f z x in  f' w xs z0foldl1Ÿ f t "a let x : xs = š t in – f x xstoListš "a  (:) []null  "a  (Ą (Ą ĸ)) Ŗlength¤ "a Ĩ . Ž (Ą (Ļ 1))%Note that this checks to ensure that foldl' and foldr' are suitably strict.SafeVI,quickcheck-classes'Tests the following functor properties: Identity§ w "a w Composition§ (f z g) "a § f z § gConst(¨) "a § ĄSafeVL†quickcheck-classesTests the following properties: Quotient Remainder(quot x y) * y + (rem x y) "a xDivision Modulus(div x y) * y + (mod x y) "a xInteger RoundtripfromInteger (toInteger x) "a xNone <FQTVl`quickcheck-classesTests the following properties: Partial IsomorphismfromList . toList "a idLength Preservation&fromList xs "a fromListN (length xs) xsNote:2 This property test is only available when using base-4.7 or newer.quickcheck-classesProperty for the generate^ function, which builds a container of a given length by applying a function to each index.quickcheck-classesProperty for the filterD function, which keeps elements for which the predicate holds true.quickcheck-classesProperty for the filterM^ function, which keeps elements for which the predicate holds true in an applicative context. quickcheck-classesProperty for the mapMaybeD function, which keeps elements for which the predicate holds true.quickcheck-classesinput element typequickcheck-classesfoldr functionquickcheck-classesinput element typequickcheck-classesfoldl functionquickcheck-classesinput element typequickcheck-classesmonadic foldl functionquickcheck-classesinput element typequickcheck-classesoutput element typequickcheck-classes map functionquickcheck-classesinput element typequickcheck-classesoutput element typequickcheck-classesindexed map functionquickcheck-classesinput element typequickcheck-classesoutput element typequickcheck-classesmonadic indexed map functionquickcheck-classesinput element typequickcheck-classesoutput element typequickcheck-classestraverse functionquickcheck-classesinput element typequickcheck-classesinput element typequickcheck-classesinput element typequickcheck-classesinput element typequickcheck-classes element typequickcheck-classes map functionquickcheck-classes element typequickcheck-classestraverse function quickcheck-classesinput element typequickcheck-classesoutput element typequickcheck-classes map function!quickcheck-classesinput element typequickcheck-classesoutput element typequickcheck-classestraverse function ! !NoneVq"quickcheck-classesTests the following properties: Partial Isomorphismdecode . encode "a JustEncoding Equals Valuedecode . encode "a Just . toJSON8Note that in the second property, the type of decode is ByteString -> Value, not ByteString -> a"SafeVtp#quickcheck-classes'Tests the following monadic properties:  Left IdentityŠ a Ē k "a k aRight Identitym Ē Š "a m Associativitym Ē (\x -> k x Ē h) "a (m Ē k) Ē hReturn| "a ŠAp(}) "a Ģ#SafeVv Ŧquickcheck-classesTests the following ­ properties:  Left ZeroŽ s Ē f "a Ž sŦSafeVy˜$quickcheck-classes*Tests the following monad plus properties:  Left Identity¯ € x "a xRight Identity¯ x € "a x Associativity¯ a (¯ b c) "a ¯ (¯ a b) c)  Left Zero° Ē f "a ° Right Zerom ą ° "a °$SafeV}$%quickcheck-classes/Tests the following monadic zipping properties:  Naturality˛ (f ŗ g) (´ ma mb) = ´ (˛ f ma) (˛ g mb)&In the laws above, the infix function ŗ" refers to a typeclass method of ĩ.%SafeV‚´&quickcheck-classesTests the following properties:  Associative1mappend a (mappend b c) "a mappend (mappend a b) c Left Identitymappend mempty a "a aRight Identitymappend a mempty "a a Concatenation$mconcat as "a foldr mappend mempty as'quickcheck-classesTests everything from & plus the following:  Commutativemappend a b "a mappend b a&'SafeV…I(quickcheck-classesTests the following properties:  Antisymmetrya "d b "' b "d a !Ō a = b  Transitivitya "d b "' b "d c !Ō a "d cTotality a "d b "( a > b(SafeVˆ¸)quickcheck-classes#Tests the following alt properties:  Left Identityļ ‚ m "a mRight Identitym ‚ ļ "a m*quickcheck-classesTests everything from altLaws, plus the following:  Congruencyļ "a €)*None DFTV–+quickcheck-classes Test that a ˇ instance obey the several laws.¸quickcheck-classesdestination pointerquickcheck-classes source arrayquickcheck-classesoffset into source arrayquickcheck-classesnumber of prims to copyšquickcheck-classesdestination arrayquickcheck-classesoffset into destination arrayquickcheck-classes source arrayquickcheck-classesoffset into source arrayquickcheck-classesnumber of bytes to copyēquickcheck-classesdestination arrayquickcheck-classesoffset into destination arrayquickcheck-classes source arrayquickcheck-classesoffset into source arrayquickcheck-classesnumber of bytes to copyģquickcheck-classes array to fillquickcheck-classesoffset into arrayquickcheck-classesnumber of values to fillquickcheck-classesvalue to fill with+SafeVšn,quickcheck-classesTests the following properties:  Associativea ŧ (b ŧ c) "a (a ŧ b) ŧ c ConcatenationŊ as "a — (ŧ) asTimesž n a "a — (ŧ) (replicate n a)-quickcheck-classesTests everything from ,, plus the following:  Commutativea ŧ b "a b ŧ a,-NoneVĄ‹.quickcheck-classesTests the following ŋ properties:  Associativityf `o' (g `o' h) "a (f `o' g) `o' hNoteH: This property test is only available when this package is built with  base-4.9+ or transformers-0.5+./quickcheck-classesTests everything from . plus the following:  Commutativef `o' g "a g `o' fNoteH: This property test is only available when this package is built with  base-4.9+ or transformers-0.5+../NoneVĒ'0quickcheck-classesTests the following properties: Additive Commutativity a + b "a b + aAdditive Left Identity 0 + a "a aAdditive Right Identity a + 0 "a aMultiplicative Associativitya * (b * c) "a (a * b) * cMultiplicative Left Identity 1 * a "a aMultiplicative Right Identity a * 1 "a a-Multiplication Left Distributes Over Additiona * (b + c) "a (a * b) + (a * c).Multiplication Right Distributes Over Addition(a + b) * c "a (a * c) + (b * c) Multiplicative Left Annihilation 0 * a "a 0!Multiplicative Right Annihilation a * 0 "a 00SafeV­—1quickcheck-classesTests the following properties: Partial IsomorphismĀ (Á a) == ˜ aNote: When using base-4.5, or older, this instead test the following: Partial Isomorphism (Á a) == a 1None DFTV°›2quickcheck-classes+Tests the following alternative properties: Set-GetrunST (à ptr ix a >> Ä ptr ix') "a aGet-SetrunST (Ä ptr ix >> à ptr ix a) "a a2SafeVēœ3quickcheck-classesTests the following Å properties:  Naturalityt z Æ f "a Æ (t z f)) for every applicative transformation tIdentityÆ Į "a Į CompositionÆ (Č z § g z f) "a Č z § (Æ g) z Æ fSequence Naturalityt z É "a É z § t) for every applicative transformation tSequence IdentityÉ z § Į "a ĮSequence CompositionÉ z § Č "a Č z § É z ÉfoldMapŽ "a Ęfmap§ "a Ë Where an applicative transformation is a function 1t :: (Applicative f, Applicative g) => f a -> g apreserving the Ė operations, i.e. Identity: t (| x) "a | xDistributivity: t (x } y) "a t x } t y3NoneFæ 4quickcheck-classesLIn older versions of GHC, Proxy is not poly-kinded, so we provide Proxy2.6quickcheck-classesLIn older versions of GHC, Proxy is not poly-kinded, so we provide Proxy1.8quickcheck-classesMA convenience function for testing properties in GHCi. For example, at GHCi:0lawsCheck (monoidLaws (Proxy :: Proxy Ordering))-Monoid: Associative +++ OK, passed 100 tests./Monoid: Left Identity +++ OK, passed 100 tests.0Monoid: Right Identity +++ OK, passed 100 tests.Assuming that the Í instance for Î+ is good, we now have confidence that the Ī instance for Î satisfies the monoid laws.9quickcheck-classes[A convenience function that allows one to check many typeclass instances of the same type.GspecialisedLawsCheckMany (Proxy :: Proxy Word) [jsonLaws, showReadLaws]@ToJSON/FromJSON: Encoding Equals Value +++ OK, passed 100 tests.>ToJSON/FromJSON: Partial Isomorphism +++ OK, passed 100 tests.8Show/Read: Partial Isomorphism +++ OK, passed 100 tests.:quickcheck-classes[A convenience function that allows one to check many typeclass instances of the same type.GspecialisedLawsCheckMany (Proxy :: Proxy Word) [jsonLaws, showReadLaws]@ToJSON/FromJSON: Encoding Equals Value +++ OK, passed 100 tests.>ToJSON/FromJSON: Partial Isomorphism +++ OK, passed 100 tests.8Show/Read: Partial Isomorphism +++ OK, passed 100 tests.;quickcheck-classes‚A convenience function for checking multiple typeclass instances of multiple types. Consider the following Haskell source file: Pimport Data.Proxy (Proxy(..)) import Data.Map (Map) import Data.Set (Set) -- A Đ for Set ˆ2. setInt :: Proxy (Set Int) setInt = Proxy -- A Đ for Map ˆ ˆå. mapInt :: Proxy (Map Int Int) mapInt = Proxy myLaws :: Proxy a -> [Laws] myLaws p = [eqLaws p, monoidLaws p] namedTests :: [(String, [Laws])] namedTests = [ ("Set Int", myLaws setInt) , ("Map Int Int", myLaws mapInt) ]  Now, in GHCi:lawsCheckMany namedTests ˙ũTesting properties for common typeclasses ------------- -- Set Int -- ------------- Eq: Transitive +++ OK, passed 100 tests. Eq: Symmetric +++ OK, passed 100 tests. Eq: Reflexive +++ OK, passed 100 tests. Monoid: Associative +++ OK, passed 100 tests. Monoid: Left Identity +++ OK, passed 100 tests. Monoid: Right Identity +++ OK, passed 100 tests. Monoid: Concatenation +++ OK, passed 100 tests. ----------------- -- Map Int Int -- ----------------- Eq: Transitive +++ OK, passed 100 tests. Eq: Symmetric +++ OK, passed 100 tests. Eq: Reflexive +++ OK, passed 100 tests. Monoid: Associative +++ OK, passed 100 tests. Monoid: Left Identity +++ OK, passed 100 tests. Monoid: Right Identity +++ OK, passed 100 tests. Monoid: Concatenation +++ OK, passed 100 tests. ;quickcheck-classes/Element is type name paired with typeclass laws- "#$%&'()*+,-./0123456789:;-8;:9"&'( +,-012  #$%)*./36745Ņ  !"#$%&'( ) * + , -./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSSTTUVWXYZ[[\]^^_`abbccdeffghhijklmmnnooppqrstuvwxyz{|}~€‚ƒ„…ƒ„†ƒ„‡ƒˆ‰ƒˆŠƒ‹Œƒ‹ƒŽ‡ƒ‹ƒ‹ƒŽ†‘’“ƒŽ”ƒŽ•ƒŽ–ƒŽ—ƒŽ˜ƒŽ™‘š›ƒœžŸ ƒĄĸƒĄŖ¤ĨĻžŸ§ƒĄ¨ƒĄŠƒĄǃĢŦƒĢ­ƒĢރ̝ƒŽ°ƒŽąƒ˛ŗƒ˛´ƒĢĩƒŽļƒĢˇƒĢ¸ƒŽšēƒĢ샞ŧƒ˛ŊƒŽžƒĢŋƒĢƒĢÁƒŽÂžŸޟăĢŃ˛Æƒ˛ĮƒŽČƒŽÉƒŽĘƒŽËƒŽĖ̓Î΃ÎЃŽŅƒŽŌƒŽĶƒŽÔƒÕփרƒÕŲ‘ÚÛÜŨŪßāáâƒŽãƒŽäƒŽå‘æįƒčéƒęëƒčėƒíîƒíīƒđņƒđōƒķôƒõöƒđ÷ƒđøƒđųƒŽúûüũžŸūƒŽ˙ƒ0quickcheck-classes-0.4.14-9mGW2N5e3t8Ch1dexJoGcqTest.QuickCheck.ClassesTest.QuickCheck.Classes.IsListTest.QuickCheck.Classes.Common Test.QuickCheck.Classes.CategoryTest.QuickCheck.Classes.Bits!Test.QuickCheck.Classes.BifunctorTest.QuickCheck.Classes.Apply#Test.QuickCheck.Classes.Applicative#Test.QuickCheck.Classes.AlternativeTest.QuickCheck.Classes.AltTest.QuickCheck.Classes.CompatTest.QuickCheck.Classes.EnumTest.QuickCheck.Classes.Eq Test.QuickCheck.Classes.FoldableTest.QuickCheck.Classes.Functor Test.QuickCheck.Classes.IntegralTest.QuickCheck.Classes.JsonTest.QuickCheck.Classes.Monad!Test.QuickCheck.Classes.MonadFail!Test.QuickCheck.Classes.MonadPlus Test.QuickCheck.Classes.MonadZipTest.QuickCheck.Classes.MonoidTest.QuickCheck.Classes.OrdTest.QuickCheck.Classes.PlusTest.QuickCheck.Classes.Prim!Test.QuickCheck.Classes.Semigroup$Test.QuickCheck.Classes.Semigroupoid Test.QuickCheck.Classes.Semiring Test.QuickCheck.Classes.ShowRead Test.QuickCheck.Classes.Storable#Test.QuickCheck.Classes.TraversableLaws lawsTypeclasslawsProperties categoryLawscommutativeCategoryLawsbitsLaws bifunctorLaws applyLawsapplicativeLawsalternativeLawsaltLawsenumLawsboundedEnumLawseqLaws foldableLaws functorLaws integralLaws isListLaws foldrProp foldlProp foldlMPropmapPropimapProp imapMProp traverseProp generateProp generateMProp replicatePropreplicateMProp filterProp filterMProp mapMaybeProp mapMaybeMPropjsonLaws monadLaws monadPlusLaws monadZipLaws monoidLawscommutativeMonoidLawsordLawsplusLawsextendedPlusLawsprimLaws semigroupLawscommutativeSemigroupLawssemigroupoidLawscommutativeSemigroupoidLaws semiringLaws showReadLaws storableLawstraversableLawsProxy2Proxy1 lawsCheckspecialisedLawsCheckMany lawsCheckOne lawsCheckMany$fMonoidStatus$fSemigroupStatusLinearEquationTwo_linearEquationTwoX_linearEquationTwoYQuadraticEquation_quadraticEquationQuadratic_quadraticEquationLinear_quadraticEquationConstantLinearEquationMLinearEquation_linearEquationLinear_linearEquationConstantApply2 getApply2ApplygetApplyBottomBottomUndefined BottomValue LastNothing ChooseFirst ChooseSecondTriplemyForAllShrink nestedEq1 propNestedEq1toSpecialApplicativeflipPairapTransfunc1func2func3func4func5func6 reverseTriplefoldMapArunLinearEquationrunLinearEquationMrunQuadraticEquationrunLinearEquationTwobaseControl.CategoryCategory.id Data.BitsBits FiniteBitsData.Bifunctor BifunctorbimapGHC.Basefirstsecond*semigroupoids-5.3.1-9tV44tnrKfhIlNGAJuAHtPData.Functor.Bind.Class<.>pure<*>$liftA2empty<|>Data.Functor.Alt Data.Functor<$>ghc-prim GHC.TypesisTrue#GHC.Enumsuccpred integer-gmpGHC.Integer.TypeIntegerIntfromEnumtoEnumBounded Data.FoldableFoldablefoldfoldMapfoldrmappendmemptyData.Semigroup.InternalappEndoEndofoldr'$!foldlfoldr1JustunsnoctoListgetDualDualflipfoldl'foldl1nullconstFalseTruelengthgetSumSumfmap<$return>>=ap monadFailLawsControl.Monad.Fail MonadFailfailmplusmzero>>liftM Control.Arrow***Control.Monad.ZipmzipArrowData.Functor.Pluszero(primitive-0.6.4.0-39Pwmm1zkQX6bM7xFUT3JcData.Primitive.TypesPrimcopyPrimArrayToPtrcopyMutablePrimArray copyPrimArray setPrimArray<>sconcatstimesData.Semigroupoid Semigroupoid Text.Read readMaybeGHC.ShowshowreadForeign.Storable pokeElemOff peekElemOffData.Traversable TraversabletraverseData.Functor.IdentityIdentityData.Functor.ComposeCompose sequenceAfoldMapDefault fmapDefault Applicative(QuickCheck-2.11.3-58QsvdIMmwDDNaUIIDmLArTest.QuickCheck.Arbitrary ArbitraryOrderingMonoid Data.ProxyProxy