1
1
mirror of https://github.com/github/semantic.git synced 2024-12-31 10:57:00 +03:00

Parsers take blobs now.

This commit is contained in:
Rob Rix 2016-08-02 12:11:05 -04:00
parent 3c93b41f25
commit 82aae9b37a

View File

@ -41,7 +41,7 @@ import qualified Data.Text as T
diffFiles :: (HasField fields Category, HasField fields Cost, HasField fields Range, Eq (Record fields)) => Parser (Syntax Text) (Record fields) -> Renderer (Record fields) -> Both SourceBlob -> IO Text
diffFiles parser renderer sourceBlobs = do
let sources = source <$> sourceBlobs
terms <- traverse (parser . source) sourceBlobs
terms <- traverse parser sourceBlobs
let areNullOids = runBothWith (\a b -> (oid a == nullOid || null (source a), oid b == nullOid || null (source b))) sourceBlobs
let textDiff = case areNullOids of