newtype FreeGroup a
The free group generated by elements of
a, up to equality.
Note that the
Monoid instances differ from the standard such instances for
List (Signed a); two elements of the free group are equal iff they are equal after being reduced to "canonical form", i.e., cancelling adjacent inverses.