mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Use hasChanges in the JSON.
This commit is contained in:
parent
ced884d79b
commit
5eaa843abc
@ -60,7 +60,7 @@ instance ToJSON (Term leaf Info) where
|
||||
toEncoding (info :< syntax) = pairs $ mconcat (termFields info syntax)
|
||||
|
||||
lineFields :: KeyValue kv => Int -> Line (SplitDiff leaf Info) -> [kv]
|
||||
lineFields n line = [ "number" .= n, "terms" .= unLine line, "hasChanges" .= Prelude.or (Prelude.or . (True <$) <$> line) ]
|
||||
lineFields n line = [ "number" .= n, "terms" .= unLine line, "hasChanges" .= hasChanges line ]
|
||||
|
||||
termFields :: (ToJSON recur, KeyValue kv) => Info -> Syntax leaf recur -> [kv]
|
||||
termFields (Info range categories) syntax = "range" .= range : "categories" .= categories : case syntax of
|
||||
|
Loading…
Reference in New Issue
Block a user