packages feed

flow2dot 0.8 → 0.9

raw patch · 3 files changed

+19/−4 lines, 3 files

Files

Text/FlowDiagram.hs view
@@ -142,7 +142,8 @@ mkLabel :: String -> Diagram String mkLabel lbl = do   t <- gets numTier-  return $ show t ++ ": " ++ reflow lbl+  return $ if null lbl then show t+                       else (show t ++ ": " ++ reflow lbl)  invisNode :: Diagram D.NodeId invisNode = node [("style","invis"),("shape","point")]@@ -245,10 +246,15 @@ parseOrder = do string "order"                 is <- identifier `manyTill` newline                 return $ Order is-parseMsg = do f <- identifier; string "->"; t <- identifier; string ":"; m <- anything+parseMsg = do f <- identifier; string "->"; t <- identifier; m <- optionalMessage               return $ Msg f t (trim m) parseAction = do s <- identifier; string ":"; a <- anything                  return $ Action s (trim a)++optionalMessage = do+  m <- option "" (try (do {string ":"; anything}))+  optional newline+  return m  identifier, whitespace, anything :: GenParser Char st String identifier = do whitespace; i <- many1 (alphaNum <|> oneOf "_"); whitespace
flow2dot.cabal view
@@ -1,5 +1,5 @@ Name:    flow2dot-Version: 0.8+Version: 0.9 License: BSD3 License-File: LICENSE Author: Dmitry Astapov <dastapov@gmail.com>@@ -15,7 +15,7 @@  Tested-With:        GHC >=6.10.4 Build-Type:         Simple-Extra-Source-Files: README ChangeLog+Extra-Source-Files: README ChangeLog sample.flow  Library   hs-source-dirs: .
+ sample.flow view
@@ -0,0 +1,9 @@+order a b c d+a -> b: let's play "catch a ball"!+b -> c: i'll pass it along+c: what to do next?+c -> a+a: "hello d!"+a -> c: d wants to play too!+c -> d: ok, here you go: catch!+d: oops..