From 40631d8d00facee58d23693f03020033026c744c Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 23 Oct 2017 20:43:22 -0400 Subject: [PATCH] Define top-level RWS in terms of mapContiguous. --- src/RWS.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/RWS.hs b/src/RWS.hs index 9c00fb529..caf77f963 100644 --- a/src/RWS.hs +++ b/src/RWS.hs @@ -66,6 +66,10 @@ rws :: (Foldable syntax, Functor syntax, GAlign syntax) rws _ _ as [] = This <$> as rws _ _ [] bs = That <$> bs rws canCompare _ [a] [b] = if canCompareTerms canCompare a b then [These a b] else [That b, This a] +rws canCompare equivalent as bs + = ses equivalent as bs + & mapContiguous canCompare + & fmap (bimap snd snd) rws canCompare equivalent as bs = ses equivalent as bs & genFeaturizedTermsAndDiffs