1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00

Define runDiff by composition.

This commit is contained in:
Rob Rix 2017-07-19 15:46:27 -04:00
parent 2cce3dd671
commit 17af42e21e

View File

@ -37,9 +37,7 @@ main = do
writeToOutput = maybe B.putStr B.writeFile
runDiff :: SomeRenderer DiffRenderer -> Either Handle [Both (FilePath, Maybe Language)] -> IO ByteString
runDiff (SomeRenderer diffRenderer) from = do
blobs <- readBlobPairs from
Task.runTask (Semantic.diffBlobPairs diffRenderer blobs)
runDiff (SomeRenderer diffRenderer) = Task.runTask . Semantic.diffBlobPairs diffRenderer <=< readBlobPairs
data ParseMode = ParseStdin | ParsePaths [(FilePath, Maybe Language)]
deriving Show