Producing a diff patch for type-level lists when they mismatch
When working with type-level lists, especially in the context of effect systems, the type mismatch errors given by GHC, while quite honest in their complexity, can also hamper understanding of the problem:
I found myself producing patch diffs via git of these two error messages, who thankfully are formatted in the same, to determine what were the missing members:
So I would like to suggest a feature where upon a mismatch of a type-level list, GHC would offer a patch diff of the two.
Multiple options can be possible:
- Something like the Myers algorithm's output
- Keeping the structure of the error message but highlighting with colours in the terminal what is extraneous