mirror of
https://github.com/github/semantic.git
synced 2025-01-06 23:46:21 +03:00
Compute the parent graph.
This commit is contained in:
parent
40269c8fc5
commit
1d375d8d61
@ -79,6 +79,9 @@ instance ( Effectful m
|
|||||||
insertVertexName name
|
insertVertexName name
|
||||||
liftAnalyze analyzeModule recur m
|
liftAnalyze analyzeModule recur m
|
||||||
|
|
||||||
|
parentGraph :: SomeOrigin term -> ImportGraph
|
||||||
|
parentGraph = connect <$> packageGraph <*> moduleGraph
|
||||||
|
|
||||||
packageGraph :: SomeOrigin term -> ImportGraph
|
packageGraph :: SomeOrigin term -> ImportGraph
|
||||||
packageGraph = maybe empty (vertex . Package . packageName) . withSomeOrigin originPackage
|
packageGraph = maybe empty (vertex . Package . packageName) . withSomeOrigin originPackage
|
||||||
|
|
||||||
@ -95,7 +98,7 @@ insertVertexName :: forall m location term value effects
|
|||||||
-> ImportGraphing m effects ()
|
-> ImportGraphing m effects ()
|
||||||
insertVertexName name = do
|
insertVertexName name = do
|
||||||
o <- raise ask
|
o <- raise ask
|
||||||
modifyImportGraph (moduleGraph @term o >< vertex (Module name) <>)
|
modifyImportGraph (parentGraph @term o >< vertex (Module name) <>)
|
||||||
|
|
||||||
(><) :: Graph a => a -> a -> a
|
(><) :: Graph a => a -> a -> a
|
||||||
(><) = connect
|
(><) = connect
|
||||||
|
Loading…
Reference in New Issue
Block a user