1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 05:58:34 +03:00

🔥 SourceSpan.maybeConcat.

This commit is contained in:
Rob Rix 2017-01-20 14:38:02 -05:00
parent 48f119539f
commit 546369c625

View File

@ -58,9 +58,6 @@ displayStartEndPos sp =
unionSourceSpansFrom :: Foldable f => SourceSpan -> f SourceSpan -> SourceSpan
unionSourceSpansFrom sourceSpan = maybe sourceSpan sconcat . nonEmpty . toList
maybeConcat :: (Foldable f, Semigroup a) => f a -> Maybe a
maybeConcat = getOption . foldMap (Option . Just)
unionSourceSpans :: Foldable f => f SourceSpan -> SourceSpan
unionSourceSpans = unionSourceSpansFrom emptySourceSpan