1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Compute a substring from a range.

This commit is contained in:
Rob Rix 2015-11-25 12:53:56 -05:00
parent 40a0bc0b91
commit 8bc51c2f86

View File

@ -117,3 +117,6 @@ parseModuleFile file = do
files (a : as) = (a, file as) where
file (a : as) = a
files [] = error "expected two files to diff"
substring :: Range -> String -> String
substring range = take (end range) . drop (start range)