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

Use mergeEdit to define pathForBlobPair.

This commit is contained in:
Rob Rix 2019-10-18 12:02:47 -04:00
parent 43eeca7d10
commit 0b6b79b42b
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -128,10 +128,7 @@ languageForBlobPair (Compare a b)
= blobLanguage b
pathForBlobPair :: BlobPair -> FilePath
pathForBlobPair x = blobPath $ case x of
Insert b -> b
Delete b -> b
Compare _ b -> b
pathForBlobPair = blobPath . mergeEdit (const id)
languageTagForBlobPair :: BlobPair -> [(String, String)]
languageTagForBlobPair pair = showLanguage (languageForBlobPair pair)