graph-rewriting-0.8.0: Monadic graph rewriting of hypergraphs with ports and multiedges
Safe HaskellSafe-Inferred
LanguageHaskell2010

GraphRewriting.Graph.Types

Synopsis

Documentation

data Graph n Source #

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

Instances details
MonadReader (Graph n) (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

ask :: Rewrite n (Graph n) #

local :: (Graph n -> Graph n) -> Rewrite n a -> Rewrite n a #

reader :: (Graph n -> a) -> Rewrite n a #

MonadState (Graph n) (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

get :: Rewrite n (Graph n) #

put :: Graph n -> Rewrite n () #

state :: (Graph n -> (a, Graph n)) -> Rewrite n a #

data Rewrite n a Source #

Instances

Instances details
MonadFail (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

fail :: String -> Rewrite n a #

MonadFix (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

mfix :: (a -> Rewrite n a) -> Rewrite n a #

Applicative (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

pure :: a -> Rewrite n a #

(<*>) :: Rewrite n (a -> b) -> Rewrite n a -> Rewrite n b #

liftA2 :: (a -> b -> c) -> Rewrite n a -> Rewrite n b -> Rewrite n c #

(*>) :: Rewrite n a -> Rewrite n b -> Rewrite n b #

(<*) :: Rewrite n a -> Rewrite n b -> Rewrite n a #

Functor (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

fmap :: (a -> b) -> Rewrite n a -> Rewrite n b #

(<$) :: a -> Rewrite n b -> Rewrite n a #

Monad (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

(>>=) :: Rewrite n a -> (a -> Rewrite n b) -> Rewrite n b #

(>>) :: Rewrite n a -> Rewrite n b -> Rewrite n b #

return :: a -> Rewrite n a #

MonadReader (Graph n) (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

ask :: Rewrite n (Graph n) #

local :: (Graph n -> Graph n) -> Rewrite n a -> Rewrite n a #

reader :: (Graph n -> a) -> Rewrite n a #

MonadState (Graph n) (Rewrite n) Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

get :: Rewrite n (Graph n) #

put :: Graph n -> Rewrite n () #

state :: (Graph n -> (a, Graph n)) -> Rewrite n a #

data Node Source #

Instances

Instances details
Show Node Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

Eq Node Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Ord Node Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

compare :: Node -> Node -> Ordering #

(<) :: Node -> Node -> Bool #

(<=) :: Node -> Node -> Bool #

(>) :: Node -> Node -> Bool #

(>=) :: Node -> Node -> Bool #

max :: Node -> Node -> Node #

min :: Node -> Node -> Node #

data Port Source #

Instances

Instances details
Show Edge Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

showsPrec :: Int -> Edge -> ShowS #

show :: Edge -> String #

showList :: [Edge] -> ShowS #

Eq Port Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

(==) :: Port -> Port -> Bool #

(/=) :: Port -> Port -> Bool #

Ord Port Source # 
Instance details

Defined in GraphRewriting.Graph.Internal

Methods

compare :: Port -> Port -> Ordering #

(<) :: Port -> Port -> Bool #

(<=) :: Port -> Port -> Bool #

(>) :: Port -> Port -> Bool #

(>=) :: Port -> Port -> Bool #

max :: Port -> Port -> Port #

min :: Port -> Port -> Port #

type Edge Source #

Arguments

 = Port

a hyperedge really, connecting a non-empty subset of the graph's nodes (see attachedNodes)