1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Add a function to replace the character range on an Info.

This commit is contained in:
Rob Rix 2016-03-21 13:35:12 -04:00
parent cd2e07bcf3
commit 8cae8fe049

View File

@ -18,6 +18,9 @@ data Annotated a annotation f = Annotated { annotation :: !annotation, syntax ::
data Info = Info { characterRange :: !Range, categories :: !(Set Category) }
deriving (Eq, Show)
setCharacterRange :: Info -> Range -> Info
setCharacterRange info range = Info range (Diff.categories info)
instance Categorizable Info where
categories = Diff.categories