parsonsmatt/annotated-exception

Remove `Eq` constraint from `AnnC`

parsonsmatt opened this issue · 0 comments

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.