fgl-5.5.4.0: Martin Erwig's Functional Graph Library

Safe HaskellSafe
LanguageHaskell98

Data.Graph.Inductive.Monad

Contents

Description

Monadic Graphs

Synopsis

Classes

class Monad m => GraphM m gr where Source #

Minimal complete definition

emptyM, isEmptyM, matchM, mkGraphM, labNodesM

Methods

emptyM :: m (gr a b) Source #

isEmptyM :: m (gr a b) -> m Bool Source #

matchM :: Node -> m (gr a b) -> m (Decomp gr a b) Source #

mkGraphM :: [LNode a] -> [LEdge b] -> m (gr a b) Source #

labNodesM :: m (gr a b) -> m [LNode a] Source #

matchAnyM :: m (gr a b) -> m (GDecomp gr a b) Source #

noNodesM :: m (gr a b) -> m Int Source #

nodeRangeM :: m (gr a b) -> m (Node, Node) Source #

labEdgesM :: m (gr a b) -> m [LEdge b] Source #

Instances

GraphM IO SGr Source # 

Methods

emptyM :: IO (SGr a b) Source #

isEmptyM :: IO (SGr a b) -> IO Bool Source #

matchM :: Node -> IO (SGr a b) -> IO (Decomp SGr a b) Source #

mkGraphM :: [LNode a] -> [LEdge b] -> IO (SGr a b) Source #

labNodesM :: IO (SGr a b) -> IO [LNode a] Source #

matchAnyM :: IO (SGr a b) -> IO (GDecomp SGr a b) Source #

noNodesM :: IO (SGr a b) -> IO Int Source #

nodeRangeM :: IO (SGr a b) -> IO (Node, Node) Source #

labEdgesM :: IO (SGr a b) -> IO [LEdge b] Source #

GraphM (ST s) (SGr s) Source # 

Methods

emptyM :: ST s (SGr s a b) Source #

isEmptyM :: ST s (SGr s a b) -> ST s Bool Source #

matchM :: Node -> ST s (SGr s a b) -> ST s (Decomp (SGr s) a b) Source #

mkGraphM :: [LNode a] -> [LEdge b] -> ST s (SGr s a b) Source #

labNodesM :: ST s (SGr s a b) -> ST s [LNode a] Source #

matchAnyM :: ST s (SGr s a b) -> ST s (GDecomp (SGr s) a b) Source #

noNodesM :: ST s (SGr s a b) -> ST s Int Source #

nodeRangeM :: ST s (SGr s a b) -> ST s (Node, Node) Source #

labEdgesM :: ST s (SGr s a b) -> ST s [LEdge b] Source #

Operations

Graph Folds and Maps

ufoldM :: GraphM m gr => (Context a b -> c -> c) -> c -> m (gr a b) -> m c Source #

graph fold

Graph Projection

nodesM :: GraphM m gr => m (gr a b) -> m [Node] Source #

edgesM :: GraphM m gr => m (gr a b) -> m [Edge] Source #

newNodesM :: GraphM m gr => Int -> m (gr a b) -> m [Node] Source #

Graph Construction and Destruction

delNodeM :: GraphM m gr => Node -> m (gr a b) -> m (gr a b) Source #

delNodesM :: GraphM m gr => [Node] -> m (gr a b) -> m (gr a b) Source #

mkUGraphM :: GraphM m gr => [Node] -> [Edge] -> m (gr () ()) Source #

Graph Inspection

contextM :: GraphM m gr => m (gr a b) -> Node -> m (Context a b) Source #

labM :: GraphM m gr => m (gr a b) -> Node -> m (Maybe a) Source #