class Semigroup t where (<>) :: t -> t -> t class Semigroup t => Group t where e :: t inv :: t -> t