Diffing of (expression) trees.

Version on this page:0.2@rev:1
LTS Haskell 18.18:0.2.1
Stackage Nightly 2021-12-04:0.2.1
Latest on Hackage:0.2.1

See all snapshots tree-diff appears in

GPL-2.0-or-later licensed by Oleg Grenrus
Maintained by Oleg.Grenrus
This version can be pinned in stack with:tree-diff-0.2@sha256:157a27910e706570c5e5b034981421513025ad24b6054a5b5c55d5d60ab6342f,4849


Diffing of (expression) trees.


tree-diff displays pretty diffs of tree data:

Because of its untyped internal type, it copes with type changes:

As a bonus, multiline Strings and Text are diffed linewise:



  • Change the pretty printing to use less horizontal space. Pretty datastructure is changed.
  • Change Expr to use OMap; pretty-printing preserves field order.
  • Add strict and these instances
  • Add Eq and NFData (Edit a) instances.
  • Bump lower bounds


  • Support GHC-7.4 … 8.8 (use allow-newer for GHC-8.8-alpha).
  • Use raw GHC.Generics (drop generics-sop dependency)
  • Use own memoising (Vector lookup, drop MemoTrie dependency)
  • Singleton data-types (both data and newtypes) are printed in App form (i.e. no-record).
  • Change license to GPL-2.0-or-later

  • Support semigroups-0.19, hashable-1.3 and generics-sop-0.5


  • Print compact diffs
  • Add ToExpr instance for ShortByteString


  • Use BS.readFile and BS.writeFile in ediffGolden. This makes files read and written in UTF8 independently of locale. Fixes builds on appveyor.

  • Move to build-type: Simple


  • First version. Released on an unsuspecting world.