1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Stub in a type synonym for aligned diffs.

This commit is contained in:
Rob Rix 2016-03-18 12:02:07 -04:00
parent 00c3a2ef9f
commit e61d8a27ff

View File

@ -109,6 +109,8 @@ type Row a = Both (Line a)
-- | A fixpoint over a functor.
newtype Fix f = Fix { unFix :: f (Fix f) }
type AlignedDiff leaf = Cofree (Aligned (Syntax leaf)) Info
alignPatch :: Patch (Term leaf Info) -> Fix (Aligned (Syntax leaf))
alignPatch (Insert term) = hylo (Fix . AlignThis . pure) unwrap term
alignPatch (Delete term) = hylo (Fix . AlignThat . pure) unwrap term