Use Data.Monoid for clearer internal code.

Signed-off-by: Austin Seipp <aseipp@pobox.com>