Skip to content

Commit f58da57

Browse files
committed
Allow for specialisation of insNodes and insEdges
Closes #26
1 parent b42343e commit f58da57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Data/Graph/Inductive/Graph.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,14 @@ delLEdgeBy f (v,w,b) g = case match v g of
293293
insNodes :: (DynGraph gr) => [LNode a] -> gr a b -> gr a b
294294
insNodes vs g = foldl' (flip insNode) g vs
295295

296+
{-# INLINABLE insNodes #-}
297+
296298
-- | Insert multiple 'LEdge's into the 'Graph'.
297299
insEdges :: (DynGraph gr) => [LEdge b] -> gr a b -> gr a b
298300
insEdges es g = foldl' (flip insEdge) g es
299301

302+
{-# INLINABLE insEdges #-}
303+
300304
-- | Remove multiple 'Node's from the 'Graph'.
301305
delNodes :: (Graph gr) => [Node] -> gr a b -> gr a b
302306
delNodes vs g = foldl' (snd .: flip match) g vs

0 commit comments

Comments
 (0)