Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 293f178

Browse files
committed
📝 parseGraph.
1 parent d1b1d12 commit 293f178

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

semantic-analysis/src/Analysis/Syntax.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ parseFile path = do
116116

117117
newtype Graph = Graph { terms :: IntMap.IntMap Term }
118118

119+
-- | Parse a @Value@ into an entire graph of terms, as well as a root node, if any exists.
119120
parseGraph :: A.Value -> A.Parser (Graph, Maybe Term)
120121
parseGraph = A.withArray "nodes" $ \ nodes -> do
121122
(untied, First root) <- fold <$> traverse parseNode (V.toList nodes)

0 commit comments

Comments
 (0)