mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Alignment
This commit is contained in:
parent
fb5cb974a6
commit
c819d50813
@ -78,12 +78,13 @@ data Symbol = Symbol
|
||||
} deriving (Generic, Eq, Show)
|
||||
|
||||
instance ToJSON Symbol where
|
||||
toJSON Symbol{..} = objectWithoutNulls [ "symbol" .= symbolName
|
||||
, "path" .= symbolPath
|
||||
, "language" .= symbolLang
|
||||
, "kind" .= symbolKind
|
||||
, "line" .= symbolLine
|
||||
, "span" .= symbolSpan ]
|
||||
toJSON Symbol{..} = objectWithoutNulls
|
||||
[ "symbol" .= symbolName
|
||||
, "path" .= symbolPath
|
||||
, "language" .= symbolLang
|
||||
, "kind" .= symbolKind
|
||||
, "line" .= symbolLine
|
||||
, "span" .= symbolSpan ]
|
||||
where objectWithoutNulls = object . filter (\(_, v) -> v /= Null)
|
||||
|
||||
when :: Bool -> a -> Maybe a
|
||||
|
Loading…
Reference in New Issue
Block a user