1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Fix a couple of instances.

This commit is contained in:
Rob Rix 2019-12-20 10:55:50 -05:00
parent c04c59d772
commit 38215571c1
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -35,7 +35,7 @@ instance ToJSON Ref where
, "span" .= span
]
instance ToJSON (Decl Name) where
instance ToJSON Decl where
toJSON Decl{declSymbol, declPath, declSpan} = object
[ "kind" .= ("decl" :: Text)
, "symbol" .= declSymbol
@ -43,5 +43,5 @@ instance ToJSON (Decl Name) where
, "span" .= declSpan
]
instance ToJSON (ScopeGraph Name) where
instance ToJSON ScopeGraph where
toJSON (ScopeGraph sc) = toJSON . Map.mapKeys declSymbol $ sc