1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Compute the chunks in a Unified rendering.

This commit is contained in:
Rob Rix 2015-11-27 14:15:42 -05:00
parent ea37bf8889
commit b1629443fb

View File

@ -15,6 +15,10 @@ data Unified =
One (Chunk String)
| Many [Unified]
chunks :: Unified -> [Chunk String]
chunks (One s) = [s]
chunks (Many s) = concatMap chunks s
unified :: Diff a Info -> String -> String -> IO ByteString
unified diff before after = do
renderer <- byteStringMakerFromEnvironment