1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 05:58:34 +03:00

Stub in a RenderableSplitDiff type.

This commit is contained in:
Rob Rix 2015-12-22 10:20:36 -05:00
parent c70eb44f90
commit 6703efceb6

View File

@ -132,6 +132,8 @@ instance Monoid (Line a) where
-- | A diff with only one sides annotations.
type SplitDiff leaf annotation = Free (Annotated leaf annotation) (Term leaf annotation)
newtype RenderableSplitDiff leaf annotation = RenderableSplitDiff (String, SplitDiff leaf annotation)
splitDiffByLines :: Diff a Info -> (Int, Int) -> (String, String) -> ([Row (SplitDiff a Info)], (Range, Range))
splitDiffByLines diff (prevLeft, prevRight) sources = case diff of
Free (Annotated annotation syntax) -> (splitAnnotatedByLines sources (ranges annotation) (categories annotation) syntax, ranges annotation)