mirror of
https://github.com/github/semantic.git
synced 2024-12-15 01:51:39 +03:00
Correct associatedScope using >>=.
This commit is contained in:
parent
3a3fa0c541
commit
98107e05be
@ -270,7 +270,7 @@ scopeOfDeclaration Declaration{..} g@ScopeGraph{..} = go (Map.keys graph)
|
||||
associatedScope :: Ord scope => Declaration -> ScopeGraph scope -> Maybe scope
|
||||
associatedScope Declaration{..} g@ScopeGraph{..} = go (Map.keys graph)
|
||||
where
|
||||
go = foldr (\ scope -> (snd . snd . fst <$> lookupDeclaration unDeclaration scope g <|>)) Nothing
|
||||
go = foldr (\ scope -> ((lookupDeclaration unDeclaration scope g >>= snd . snd . fst) <|>)) Nothing
|
||||
|
||||
newtype Reference = Reference { unReference :: Name }
|
||||
deriving (Eq, Ord, Show, Generic, NFData)
|
||||
|
Loading…
Reference in New Issue
Block a user