This repository was archived by the owner on Apr 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
semantic-scope-graph/src/Stack Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,15 @@ module Stack.Path
17
17
18
18
import Data.Functor.Tagged
19
19
import Data.Monoid
20
- import Data.Text (Text )
21
- import Stack.Graph (Node (.. ), Symbol )
22
20
import Data.Semigroup (sconcat )
23
21
import Data.Sequence (Seq (.. ))
22
+ import Data.Text (Text )
23
+ import Stack.Graph (Node (.. ), Symbol )
24
24
25
+ -- | A partial path through a stack graph. These will be generated
26
+ -- from walks through the stack graph, and can be thought of as
27
+ -- representing a snapshot of the pathfinding algorithm at a given
28
+ -- state.
25
29
data Path = Path
26
30
{ startingNode :: Tagged Node
27
31
, endingNode :: Tagged Node
@@ -123,7 +127,7 @@ data Completion = Partial | Complete
123
127
-- | A path is complete if its starting node is a reference node and its ending node is a definition node. Otherwise it is partial.
124
128
completion :: Path -> Completion
125
129
completion Path { startingNode = Reference {} :# _, endingNode = Declaration {} :# _} = Complete
126
- completion _ = Partial
130
+ completion _ = Partial
127
131
128
132
-- | A path is incremental if the source node and sink node of every edge in the path belongs to the same file.
129
133
isIncremental :: Path -> Bool
You can’t perform that action at this time.
0 commit comments