hdiff-0.0.1: Pattern-Expression-based differencing of arbitrary types.

Safe HaskellNone
LanguageHaskell2010

Data.HDiff.Diff.Preprocess

Description

Here we perform a bunch of preprocessing steps from a Fix into a AnnFix with the correct information for both driving the algorithm and efficiently storing digests alongside the structure.

Synopsis

Documentation

data PrepData a Source #

We precompute the digest of a tree and its height and annotate our fixpoints with this data before going forward and computing a diff.

Constructors

PrepData 

Fields

Instances
Eq a => Eq (PrepData a) Source # 
Instance details

Defined in Data.HDiff.Diff.Preprocess

Methods

(==) :: PrepData a -> PrepData a -> Bool #

(/=) :: PrepData a -> PrepData a -> Bool #

Show a => Show (PrepData a) Source # 
Instance details

Defined in Data.HDiff.Diff.Preprocess

Methods

showsPrec :: Int -> PrepData a -> ShowS #

show :: PrepData a -> String #

showList :: [PrepData a] -> ShowS #

type PrepFix a ki codes phi = HolesAnn (Const (PrepData a)) ki codes phi Source #

A PrepFix is a prepared fixpoint. In our case, it is just a HolesAnn with the prepared data inside of it.

preprocess :: forall ki codes phi at. (DigestibleHO ki, DigestibleHO phi) => Holes ki codes phi at -> PrepFix () ki codes phi at Source #

Here we receive an expression with holes an annotate it with hashes and height information at every node.