1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

declaredName of New is its subject

This commit is contained in:
joshvera 2018-12-07 17:31:59 -05:00
parent 9586b476fd
commit 04e257991a

View File

@ -637,8 +637,7 @@ data New a = New { subject :: a , typeParameters :: a, arguments :: [a] }
deriving (Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Ord, Show, ToJSONFields1, Traversable, Named1, Message1, NFData1)
instance Declarations1 New where
liftDeclaredName _ (New []) = Nothing
liftDeclaredName declaredName (New (subject : _)) = declaredName subject
liftDeclaredName declaredName New{..} = declaredName subject
instance Eq1 New where liftEq = genericLiftEq
instance Ord1 New where liftCompare = genericLiftCompare