From 30e1da5a125ec4556d8d569cc6e8cd6707e1af2f Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Mar 2016 14:56:48 -0400 Subject: [PATCH] Use alignSyntax to construct Aligned functors. --- src/Alignment.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Alignment.hs b/src/Alignment.hs index b0ecb4b07..5c299e46f 100644 --- a/src/Alignment.hs +++ b/src/Alignment.hs @@ -121,7 +121,7 @@ alignPatch sources (Replace term1 term2) = let Join (This info1) :< AlignThis a Join (These info1 info2) :< AlignThese a b alignTermBy :: Both (Source Char) -> (forall r. [Syntax leaf r] -> Aligned (Syntax leaf) r) -> Join These Info -> Syntax leaf (AlignedDiff leaf) -> AlignedDiff leaf -alignTermBy sources constructor infos syntax = infos :< constructor [syntax] +alignTermBy sources constructor infos syntax = infos :< Aligned (alignSyntax sources (characterRange <$> infos) syntax) alignSyntax :: Both (Source Char) -> Join These Range -> Syntax leaf (AlignedDiff leaf) -> Join These [Syntax leaf (AlignedDiff leaf)] alignSyntax sources ranges (Leaf s) = (Leaf s <$) <$> lineRanges