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

🔥 unionSourceSpans.

This commit is contained in:
Rob Rix 2017-01-20 14:38:39 -05:00
parent 546369c625
commit a24781d2bd

View File

@ -58,9 +58,6 @@ displayStartEndPos sp =
unionSourceSpansFrom :: Foldable f => SourceSpan -> f SourceSpan -> SourceSpan
unionSourceSpansFrom sourceSpan = maybe sourceSpan sconcat . nonEmpty . toList
unionSourceSpans :: Foldable f => f SourceSpan -> SourceSpan
unionSourceSpans = unionSourceSpansFrom emptySourceSpan
unionSourceSpan :: SourceSpan -> SourceSpan -> SourceSpan
unionSourceSpan (SourceSpan start1 end1) (SourceSpan start2 end2) = SourceSpan (min start1 start2) (max end1 end2)