{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihwnooart3uyejrfxl4fbel3mdlc76yab5hlydfilcaddvecum2z4",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mkkqlr4dals2"
  },
  "path": "/t/what-is-the-most-ergonomic-library-to-diff-data-structures-in-a-test-suite-these-days/13989#post_2",
  "publishedAt": "2026-04-28T11:46:28.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "generic-diff",
    "does not display the actual values",
    "@fpringle",
    "Generic-diff: generic structural diffs"
  ],
  "textContent": "I have experimented with generic-diff recently with some level of success. As the name implies, it is based on generics, so you can derive a few instances and start using it right away with no additional boilerplate. It also ships with special diffing logic for some common container types (e.g. `Map` and `Set`) that provide nicer diff outputs compared to what you would have with just the generics-based instances. For my use case, one shortcoming of the library that ultimately didn’t allow me to fully substitute it with our in-house solution is that in the case where two values are structurally the same but have different values (e.g. just two `Int`s with different values) the diff output just reports them as “not equal”, and does not display the actual values. I attempted to add the said functionality but ultimately failed, possibly due to my lack of understanding of `generics-sop`.\n\nThe announcement post of the library by @fpringle from a year ago might also be of interest: Generic-diff: generic structural diffs",
  "title": "What is the most ergonomic library to diff data structures in a test suite these days?"
}