module Identity where import Data.Semigroup import Test.QuickCheck newtype Identity a = Identity a deriving (Show, Eq) instance Semigroup a => Semigroup (Identity a) where (Identity x) <> (Identity y) = Identity (x <> y) instance Monoid a => Monoid (Identity a) where mempty = Identity mempty mappend (Identity x) (Identity y) = Identity $ mappend x y instance Arbitrary a => Arbitrary (Identity a) where arbitrary = fmap Identity arbitrary