1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

String/range pairs are ordered.

This commit is contained in:
Rob Rix 2015-11-19 16:07:30 -08:00
parent 0702ad277d
commit 417f27cc39

View File

@ -34,3 +34,7 @@ range :: Patch (Term a Info) -> Maybe Range
range patch = range . extract <$> after patch where
extract (annotation :< _) = annotation
range (Info range _) = range
instance Ord (String, Maybe Range) where
(_, Just a) <= (_, Just b) = start a <= start b
_ <= _ = False