1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Determine equivalence by name for Declaration.Method.

This commit is contained in:
Rob Rix 2017-10-03 14:21:06 -04:00
parent 614c26749e
commit 407d368c90

View File

@ -22,7 +22,10 @@ instance Show1 Function where liftShowsPrec = genericLiftShowsPrec
-- TODO: How should we represent function types, where applicable?
data Method a = Method { methodContext :: ![a], methodReceiver :: !a, methodName :: !a, methodParameters :: ![a], methodBody :: !a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable)
deriving (Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable)
instance Diffable Method where
equivalentBySubterm = Just . methodName
instance Eq1 Method where liftEq = genericLiftEq
instance Ord1 Method where liftCompare = genericLiftCompare