-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A simple interface for building .dot graph files.
--   
--   This package 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.
@package dotgen
@version 0.4.3


-- | 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

-- | <a>node</a> takes a list of attributes, generates a new node, and
--   gives a <a>NodeId</a>.
node :: [(String, String)] -> Dot NodeId
data NodeId

-- | <a>userNodeId</a> allows a user to use their own (Int-based) node
--   id's, without needing to remap them.
userNodeId :: Int -> NodeId

-- | <a>userNode</a> takes a NodeId, and adds some attributes to that node.
userNode :: NodeId -> [(String, String)] -> Dot ()

-- | <a>edge</a> generates an edge between two <a>NodeId</a>s, with
--   attributes.
edge :: NodeId -> NodeId -> [(String, String)] -> Dot ()

-- | <a>edge</a> generates an edge between two <a>NodeId</a>s, with
--   optional node sub-labels, and attributes.
edge' :: NodeId -> Maybe String -> NodeId -> Maybe String -> [(String, String)] -> Dot ()

-- | <a>.-&gt;.</a> generates an edge between two <a>NodeId</a>s.
(.->.) :: NodeId -> NodeId -> Dot ()
showDot :: Dot a -> String

-- | <a>scope</a> groups a subgraph together; in dot these are the
--   subgraphs inside "{" and "}".
scope :: Dot a -> Dot a

-- | <a>attribute</a> gives a attribute to the current scope.
attribute :: (String, String) -> Dot ()

-- | <a>share</a> is when a set of nodes share specific attributes. Usually
--   used for layout tweaking.
share :: [(String, String)] -> [NodeId] -> Dot ()

-- | <a>same</a> provides a combinator for a common pattern; a set of
--   <a>NodeId</a>s with the same rank.
same :: [NodeId] -> Dot ()

-- | <a>cluster</a> builds an explicit, internally named subgraph (called
--   cluster).
cluster :: Dot a -> Dot (NodeId, a)

-- | <a>netlistGraph</a> generates a simple graph from a netlist.
netlistGraph :: Ord a => (b -> [(String, String)]) -> (b -> [a]) -> [(a, b)] -> Dot ()
instance GHC.Base.Functor Text.Dot.Dot
instance GHC.Base.Applicative Text.Dot.Dot
instance GHC.Base.Monad Text.Dot.Dot
instance GHC.Show.Show Text.Dot.NodeId
