Textual representation of different values at the top level - #18
Conversation
…a top-level difference
fpringle
commented
Apr 28, 2026
@ozkutuk there are 2 differences between this approach and yours. The first is simple, I decided to add a new constructor An alternative solution which we discussed would have been this: TopLevelNotEqual:: (Showa, Eqa) =>a->a->DiffErroraHowever this ended up being less elegant, and would mean removing some of the existing instances (like |
ozkutuk
left a comment
There was a problem hiding this comment.
Thanks for the super-fast PR! LGTM, just some typos in the Haddocks. Otherwise, the approach seems solid. I can see how using Text instead of a in the constructor makes for a far simpler implementation.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Berk Özkütük <berk@ozkutuk.me>
fpringle
commented
Apr 28, 2026
@ozkutuk Thanks! I shouldn't write documentation late at night 😝 |
Uh oh!
There was an error while loading. Please reload this page.
Closes#16.
Adds a new
DiffErrorconstructorTopLevelNotEqualShow. This is similar toTopLevelNotEqual, except that it includes 2Textarguments that are the result of callingshowon the compared values.Whereas before we would have
Now we have: