Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- emptyGraph :: Graph n
- nodes :: Graph n -> [n]
- edges :: Graph n -> [(Edge, [n])]
- unsafeMapNodes :: (n -> n') -> Graph n -> Graph n'
- unsafeMapNodesUnique :: (Int -> n -> n') -> Graph n -> Graph n'
- runGraph :: Rewrite n a -> Graph n -> (a, Graph n)
- evalGraph :: Rewrite n a -> Graph n -> a
- execGraph :: Rewrite n a -> Graph n -> Graph n
- module GraphRewriting.Graph.Types
- data Graph n = Graph {}
Documentation
emptyGraph :: Graph n Source #
unsafeMapNodes :: (n -> n') -> Graph n -> Graph n' Source #
unsafe, since no checks are performed to ensure that the invariants from GraphRewriting.Graph.Write are preserved
unsafeMapNodesUnique :: (Int -> n -> n') -> Graph n -> Graph n' Source #
map that supplies an additional unique key to the mapping function; unsafe
in the same way as unsafeMapNodes
runGraph :: Rewrite n a -> Graph n -> (a, Graph n) Source #
apply a monadic graph modification to a graph
module GraphRewriting.Graph.Types
Hypergraph that holds nodes of type n
. Nodes can be referenced by type Node
, edges by type Port
, see GraphRewriting.Graph.Read and GraphRewriting.Graph.Write
Instances
MonadReader (Graph n) (Rewrite n) Source # | |
MonadState (Graph n) (Rewrite n) Source # | |