mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
Scope graphing takes addressed terms.
This commit is contained in:
parent
da63c0cf6a
commit
d93686e01e
@ -49,13 +49,13 @@ instance Ord name => Monoid (ScopeGraph name) where
|
||||
mempty = ScopeGraph Map.empty
|
||||
|
||||
scopeGraph
|
||||
:: Ord (term Name)
|
||||
:: Ord (term Addr)
|
||||
=> (forall sig m
|
||||
. (Has (Reader Path.AbsRelFile) sig m, Has (Reader Span) sig m, MonadFail m)
|
||||
=> (term Name -> m (ScopeGraph Name))
|
||||
-> (term Name -> m (ScopeGraph Name))
|
||||
=> (term Addr -> m (ScopeGraph Name))
|
||||
-> (term Addr -> m (ScopeGraph Name))
|
||||
)
|
||||
-> [File (term Name)]
|
||||
-> [File (term Addr)]
|
||||
-> (Heap (ScopeGraph Name), [File (Either (Path.AbsRelFile, Span, String) (ScopeGraph Name))])
|
||||
scopeGraph eval
|
||||
= run
|
||||
@ -67,14 +67,14 @@ runFile
|
||||
:: ( Effect sig
|
||||
, Has Fresh sig m
|
||||
, Has (State (Heap (ScopeGraph Name))) sig m
|
||||
, Ord (term Name)
|
||||
, Ord (term Addr)
|
||||
)
|
||||
=> (forall sig m
|
||||
. (Has (Reader Path.AbsRelFile) sig m, Has (Reader Span) sig m, MonadFail m)
|
||||
=> (term Name -> m (ScopeGraph Name))
|
||||
-> (term Name -> m (ScopeGraph Name))
|
||||
=> (term Addr -> m (ScopeGraph Name))
|
||||
-> (term Addr -> m (ScopeGraph Name))
|
||||
)
|
||||
-> File (term Name)
|
||||
-> File (term Addr)
|
||||
-> m (File (Either (Path.AbsRelFile, Span, String) (ScopeGraph Name)))
|
||||
runFile eval file = traverse run file
|
||||
where run = runReader (filePath file)
|
||||
|
Loading…
Reference in New Issue
Block a user