mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Eta reduce textDiff.
This commit is contained in:
parent
d9de3545d8
commit
893c1d9067
@ -131,12 +131,11 @@ diffCostWithCachedTermCosts diff = unCost $ case runFree diff of
|
||||
|
||||
-- | Returns a rendered diff given a parser, diff arguments and two source blobs.
|
||||
textDiff :: (Eq (Record fields), HasField fields Category, HasField fields Cost, HasField fields Range) => Parser (Syntax Text) (Record fields) -> DiffArguments -> Both SourceBlob -> IO Text
|
||||
textDiff parser arguments sources = diffFiles parser renderer sources
|
||||
where renderer = case format arguments of
|
||||
Split -> split
|
||||
Patch -> patch
|
||||
JSON -> json
|
||||
Summary -> summary
|
||||
textDiff parser arguments = diffFiles parser $ case format arguments of
|
||||
Split -> split
|
||||
Patch -> patch
|
||||
JSON -> json
|
||||
Summary -> summary
|
||||
|
||||
-- | Returns a truncated diff given diff arguments and two source blobs.
|
||||
truncatedDiff :: DiffArguments -> Both SourceBlob -> IO Text
|
||||
|
Loading…
Reference in New Issue
Block a user