Textual representation of different values at the top level#18
Conversation
…a top-level difference
|
@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 :: (Show a, Eq a) => a -> a -> DiffError aHowever 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.
Co-authored-by: Berk Özkütük <berk@ozkutuk.me>
|
@ozkutuk Thanks! I shouldn't write documentation late at night 😝 |
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: