From 18148069807717e734bb6ffa3d4896a98bafad52 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 4 Dec 2015 10:12:47 -0500 Subject: [PATCH] Add API to offset ranges in Info and Annotated. --- test/Spec.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/Spec.hs b/test/Spec.hs index a3caef533..5d1c6c931 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -34,3 +34,5 @@ main = hspec $ do where info source category = Info (totalRange source) (Range 0 0) (Set.fromList [ category ]) unchanged source category = Annotated (info source category, info source category) + offsetInfo by (Info (Range start end) lineRange categories) = Info (Range (start + by) end) lineRange categories + offsetAnnotated by (Annotated (left, right) syntax) = Annotated (offsetInfo by left, offsetInfo by right) syntax