mirror of
https://github.com/github/semantic.git
synced 2025-01-05 05:58:34 +03:00
🔥 SourceSpan.maybeConcat.
This commit is contained in:
parent
48f119539f
commit
546369c625
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user