Related to #9 where Show is problematic in AnnC, we can also probably drop the Eq constraint.
Eq is useful primarily in the test suite. I have run into some issues in the work codebase where deriving Eq ended up being a chore because SomeException does not have an Eq instance (and while you can hack one in with a a == b = show a == show b, it's not great).
The main utility of an Annotation is not comparing it with another, it is rendering it into a value that can be used intelligently in your error reporting behavior. So converting to String as a last resort makes sense, but doing Eq is less defensible.
Related to #9 where
Show
is problematic inAnnC
, we can also probably drop theEq
constraint.Eq
is useful primarily in the test suite. I have run into some issues in the work codebase wherederiving Eq
ended up being a chore becauseSomeException
does not have anEq
instance (and while you can hack one in with aa == b = show a == show b
, it's not great).The main utility of an
Annotation
is not comparing it with another, it is rendering it into a value that can be used intelligently in your error reporting behavior. So converting toString
as a last resort makes sense, but doingEq
is less defensible.