-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A simple interface for building .dot graph files.
--
@package dotgen
@version 0.4.2
-- | This module provides a simple interface for building .dot graph files,
-- for input into the dot and graphviz tools. It includes a monadic
-- interface for building graphs.
module Text.Dot
data Dot a
-- | node takes a list of attributes, generates a new node, and
-- gives a NodeId.
node :: [(String, String)] -> Dot NodeId
data NodeId
-- | userNodeId allows a user to use their own (Int-based) node
-- id's, without needing to remap them.
userNodeId :: Int -> NodeId
-- | userNode takes a NodeId, and adds some attributes to that node.
userNode :: NodeId -> [(String, String)] -> Dot ()
-- | edge generates an edge between two NodeIds, with
-- attributes.
edge :: NodeId -> NodeId -> [(String, String)] -> Dot ()
-- | edge generates an edge between two NodeIds, with
-- optional node sub-labels, and attributes.
edge' :: NodeId -> Maybe String -> NodeId -> Maybe String -> [(String, String)] -> Dot ()
-- | .->. generates an edge between two NodeIds.
(.->.) :: NodeId -> NodeId -> Dot ()
showDot :: Dot a -> String
-- | scope groups a subgraph together; in dot these are the
-- subgraphs inside "{" and "}".
scope :: Dot a -> Dot a
-- | attribute gives a attribute to the current scope.
attribute :: (String, String) -> Dot ()
-- | share is when a set of nodes share specific attributes. Usually
-- used for layout tweaking.
share :: [(String, String)] -> [NodeId] -> Dot ()
-- | same provides a combinator for a common pattern; a set of
-- NodeIds with the same rank.
same :: [NodeId] -> Dot ()
-- | cluster builds an explicit, internally named subgraph (called
-- cluster).
cluster :: Dot a -> Dot (NodeId, a)
-- | netlistGraph generates a simple graph from a netlist.
netlistGraph :: Ord a => (b -> [(String, String)]) -> (b -> [a]) -> [(a, b)] -> Dot ()
instance Monad Dot
instance Applicative Dot
instance Functor Dot
instance Show NodeId