1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 17:05:33 +03:00

document addImportEdge

This commit is contained in:
joshvera 2020-02-05 21:11:15 -05:00
parent a47186f38d
commit 0bc0a638b3

View File

@ -354,6 +354,8 @@ insertEdge label target currentAddress g@(ScopeGraph graph) = fromMaybe g $ do
let newScope = currentScope' { edges = Map.insert label (target : scopes) (edges currentScope') }
pure (ScopeGraph (Map.insert currentAddress newScope graph))
-- | Add an import edge of the form 'a -> Import -> b -> Import -> c' or creates intermediate void scopes of the form
-- 'a -> VoidL -> b -> Import -> c' if the given scopes cannot be found.
addImportEdge :: Ord scopeAddress => EdgeLabel -> [scopeAddress] -> scopeAddress -> ScopeGraph scopeAddress -> ScopeGraph scopeAddress
addImportEdge edge importEdge currentAddress g = do
case importEdge of