From c819d508137dc5284548dc819c368ce0577bbdaa Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Mon, 22 Jan 2018 11:24:30 -0800 Subject: [PATCH] Alignment --- src/Rendering/Symbol.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Rendering/Symbol.hs b/src/Rendering/Symbol.hs index b59a5fc93..339ec48e3 100644 --- a/src/Rendering/Symbol.hs +++ b/src/Rendering/Symbol.hs @@ -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