-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generate flow charts from your code base. -- -- See Development.Flo for syntax and examples. Example -- commandline usage: find . | grep '\.js$' | xargs flo '-js=/// ' | -- dot -Tpng > flow.png @package flo @version 0.1 -- | Generate a flow chart by from annotations from a code base. -- -- The syntax is as follows: -- --
--   expr  <- label / next / do / if / task
--   label <- "label" name
--   task  <- "task" text
--   next  <- "next" name / "trigger" name
--   do    <- "do" text
--   if    <- "if" name "\n" "then" name ("\n" "else" name)?
--   
-- -- where name and text are both arbitrary text. -- -- A label is used to label a node in the graph. next -- is used to link the current node to another node by its label. The -- text for a node is written by do, which explains what this -- node does, or by using if which makes this node a conditional -- which goes to one of two possible nodes. -- -- Example (assuming \/\// to be the declaration prefix): -- --
--   /// label main
--   /// if Logged in?
--   /// then display_overview
--   /// else display_login
--   /// label display_overview
--   /// do Display overview.
--   /// next display_event
--   /// next display_paper
--   // Event list code here.
--   event_list();
--   /// label display_login
--   /// do Display login.
--   /// next try_login
--   // Login display code here.
--   display_login();
--   /// label try_login
--   /// do Check login.
--   /// next main
--   /// trigger log_access_time
--   // Login attempt code here.
--   if(check_login()) log_attempt_success();
--   /// label display_event
--   /// do Display a single event.
--   /// next display_paper
--   // Event list code here.
--   display_event();
--   /// label display_paper
--   /// do Display a single paper.
--   // Paper display code here.
--   display_paper();
--   /// label log_access_time
--   /// task Log login accesses.
--   log_login();
--   
-- -- In other words: You have a main page which either displays a login -- screen or lists the user's events if logged in. From the events page -- you can get to the event page. -- -- Custom syntax can be used, too. Example: -- --
--    {- # bar -}
--   SELECT * FROM mysql;
--   
module Development.Flo -- | A workflow node. data Node Node :: Name -> [Edge] -> String -> Type -> Node nodeName :: Node -> Name nodeEdges :: Node -> [Edge] nodeDesc :: Node -> String nodeType :: Node -> Type -- | Type of the node. data Type Action :: Type Condition :: Type Background :: Type -- | A workflow connection. data Edge Edge :: String -> Name -> Edge edgeLabel :: Edge -> String edgeTo :: Edge -> Name -- | A workflow declaration. data Decl -- | Sets the current node. Label :: Name -> Decl -- | Links to a next node (an edge). Next :: Name -> Decl -- | Describes this node. Do :: String -> Decl -- | Run some task (create db entry, delete file, send email etc.). Task :: String -> Decl -- | Makes this node a conditional. If :: String -> Name -> (Maybe Name) -> Decl -- | A node name. data Name -- | Wrap a string up in a digraph. digraph :: String -> String -- | Convert a list of nodes to a Graphviz dot document. nodesToDot :: [Node] -> String -- | Converts a list of declarations to a list of nodes. declsToNodes :: [Decl] -> [Node] -- | Parse a source file containing commented declarations. parseFile :: FilePath -> String -> Maybe String -> IO (Either ParseError [Decl]) instance Eq Type instance Enum Type instance Show Type instance Eq Name instance Show Name instance Show Decl instance Show Edge instance Show Node