1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Compute a pair of Sources from a list of child lines.

This commit is contained in:
Rob Rix 2016-05-20 21:50:41 -04:00
parent 048c9d34c2
commit 6eabdd06eb

View File

@ -190,6 +190,9 @@ data Child = Child
toSource :: [Child] -> Source.Source Char
toSource = Source.fromList . concatMap show
toSources :: [Join These Child] -> Both (Source.Source Char)
toSources = fmap toSource . toChildLists
toChildLists :: [Join These Child] -> Both [Child]
toChildLists = foldMap (modifyJoin (fromThese [] []) . fmap (:[]))