Skip to content

Commit 1b08580

Browse files
committed
Try to clear up semantics of merge
Closes #57
1 parent 208d83d commit 1b08580

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Data/Graph/Inductive/Graph.hs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ type UPath = [UNode]
111111
-- | Labeled links to or from a 'Node'.
112112
type Adj b = [(b,Node)]
113113
-- | Links to the 'Node', the 'Node' itself, a label, links from the 'Node'.
114+
--
115+
-- In other words, this captures all information regarding the
116+
-- specified 'Node' within a graph.
114117
type Context a b = (Adj b,Node,a,Adj b) -- Context a b "=" Context' a b "+" Node
115118
type MContext a b = Maybe (Context a b)
116119
-- | 'Graph' decomposition - the context removed from a 'Graph', and the rest
@@ -176,8 +179,11 @@ class Graph gr where
176179
class (Graph gr) => DynGraph gr where
177180
-- | Merge the 'Context' into the 'DynGraph'.
178181
--
179-
-- Contexts should only refer to either a Node already in a graph
180-
-- or the node in the Context itself (for loops).
182+
-- Context adjacencies should only refer to either a Node already
183+
-- in a graph or the node in the Context itself (for loops).
184+
--
185+
-- Behaviour is undefined if the specified 'Node' already exists
186+
-- in the graph.
181187
(&) :: Context a b -> gr a b -> gr a b
182188

183189

0 commit comments

Comments
 (0)