1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 18:23:44 +03:00

🔥 toSource.

This commit is contained in:
Rob Rix 2016-05-20 22:42:46 -04:00
parent 5d9de67ecc
commit 9acdb24243

View File

@ -193,9 +193,6 @@ alignBranchElement :: BranchElement -> [BranchElement]
alignBranchElement (Child key contents) = Child key <$> traverse lines contents alignBranchElement (Child key contents) = Child key <$> traverse lines contents
alignBranchElement (Margin contents) = Margin <$> traverse lines contents alignBranchElement (Margin contents) = Margin <$> traverse lines contents
toSource :: [BranchElement] -> Source.Source Char
toSource = Source.fromList . concatMap show
toSources :: [BranchElement] -> Both (Source.Source Char) toSources :: [BranchElement] -> Both (Source.Source Char)
toSources = fmap (foldMap Source.fromList) . bothContents toSources = fmap (foldMap Source.fromList) . bothContents