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

Simplify match predicate now we use (Data address, Position) for lookups

This commit is contained in:
Rick Winfrey 2018-12-12 16:22:27 -08:00
parent e305f547bc
commit 8e520132ce

View File

@ -258,7 +258,7 @@ scopeOfDeclaration Declaration{..} g@(ScopeGraph graph) = go (Map.keys graph)
associatedScope :: Ord scope => Declaration -> ScopeGraph scope -> Maybe scope
associatedScope Declaration{..} g@(ScopeGraph graph) = go (Map.keys graph)
where
go = foldr (\ scope -> ((lookupDeclaration unDeclaration scope g >>= snd . snd . fst) <|>)) Nothing
go = foldr (\ scope -> ((lookupDeclaration unDeclaration scope g >>= dataAssociatedScope . fst) <|>)) Nothing
newtype Reference = Reference { unReference :: Name }
deriving (Eq, Ord, Show, Generic, NFData)