1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Define spanToRange tacitly.

This commit is contained in:
Rob Rix 2017-06-24 15:22:58 -04:00
parent d44684cd4e
commit 5d75659c6e

View File

@ -110,7 +110,7 @@ sourceLineRangesWithin range = uncurry (zipWith Range) . ((start range:) &&& (<>
-- | Compute the byte 'Range' corresponding to a given 'Span' in a 'Source'.
spanToRange :: Source -> Span -> Range
spanToRange source = spanToRangeInLineRanges (sourceLineRangesByLineNumber source)
spanToRange = spanToRangeInLineRanges . sourceLineRangesByLineNumber
spanToRangeInLineRanges :: Array Int Range -> Span -> Range
spanToRangeInLineRanges lineRanges Span{..} = Range