-- 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.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 ()
(.->.) :: NodeId -> NodeId -> Dot ()
showDot :: Dot a -> String
-- | .->. generates an edge between two NodeIds.
--
-- 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)
instance Monad Dot
instance Show NodeId