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

Update type

This commit is contained in:
Rick Winfrey 2018-12-12 16:19:22 -08:00
parent 501f5ea9dc
commit 4cb27b3eb6

View File

@ -177,7 +177,7 @@ pathToDeclaration decl address g = DPath decl . snd <$> lookupDeclaration (unDec
insertReference :: Reference -> Path scopeAddress -> Scope scopeAddress -> Scope scopeAddress
insertReference ref path scope = scope { references = Map.insert ref path (references scope) }
lookupDeclaration :: Ord scopeAddress => Name -> scopeAddress -> ScopeGraph scopeAddress -> Maybe ((Declaration, (Span, Maybe scopeAddress)), Position)
lookupDeclaration :: Ord scopeAddress => Name -> scopeAddress -> ScopeGraph scopeAddress -> Maybe (Data scopeAddress, Position)
lookupDeclaration name scope g = do
dataSeq <- ddataOfScope scope g
index <- Seq.findIndexR (\Data{..} -> Declaration name == declaration) dataSeq