1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

O(1) length.

This commit is contained in:
Rob Rix 2017-02-10 15:48:24 -05:00
parent d1a5167999
commit ff2d0e6de6

View File

@ -114,7 +114,7 @@ rangeToSourceSpan source range@Range{} = SourceSpan startPos endPos
toEndPos line range = SourcePos line (end range)
length :: Source -> Int
length = Text.length . sourceText
length = rangeLength . sourceRange
null :: Source -> Bool
null = Text.null . sourceText