This is a Monoid instance I wrote for a Tree data type. Is this the most terse way to express mappend? Here's my type:

data Tree a = Empty | Node a (Tree a) (Tree a)


Here's the instance declaration for Monoid:

instance (Monoid a) =&gt; Monoid (Tree a) where
    mempty = Empty
    mappend Empty Empty = Empty
    mappend Empty t = t
    mappend t Empty = t
    mappend (Node val ta tb) (Node val' ta' tb') = (Node (mappend val val') (mappend ta ta') (mappend tb tb'))


This compiles, but it was tedious to write and very repetitive. Is there a better way of doing this?
You can remove mappend Empty Empty = Empty because that case will be caught by mappend Empty t = t.

instance (Monoid a) =&gt; Monoid (Tree a) where
    mempty = Empty
    mappend Empty t = t
    mappend t Empty = t
    mappend (Node val ta tb) (Node val' ta' tb') = (Node (mappend val val') (mappend ta ta') (mappend tb tb'))