1. Aleksey Khudyakov
  2. quickcheck-properties

Commits

Aleksey Khudyakov  committed 0441f39

All properties for monoid

  • Participants
  • Parent commits 5cdede3
  • Branches default

Comments (0)

Files changed (1)

File Test/QuickCheck/Property/Monoid.hs

View file
  • Ignore whitespace
   , prop_MonoidLeft
   , prop_MonoidRight
   , prop_Mappend
+  , prop_Monoid
   ) where
 
 import Data.Monoid
 -- | 'mappend' is associative
 prop_Mappend :: Monoid a => T a -> a -> a -> a -> Equal a
 prop_Mappend = prop_Associative mappend
+
+-- | All properties of monoid
+prop_Monoid :: Monoid a => T a -> a -> a -> a -> Equal a
+prop_Monoid T a b c =  prop_Mappend        T a b c 
+                  .&&. prop_MonoidIdentity T a