packages feed

flow2dot 0.5 → 0.5.1

raw patch · 2 files changed

+33/−1 lines, 2 filesnew-component:exe:flow2dotPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

flow2dot.cabal view
@@ -1,5 +1,5 @@ Name:    flow2dot-Version: 0.5+Version: 0.5.1 License: BSD3 License-File: LICENSE Author: Dmitry Astapov <dastapov@gmail.com>@@ -21,3 +21,5 @@   Exposed-Modules: Text.FlowDiagram   Build-Depends:      base, mtl >= 1.0, containers, haskell98, QuickCheck, parsec, utf8-string, dotgen >= 0.2 +Executable  flow2dot+  Main-Is:       flow2dot.hs
+ flow2dot.hs view
@@ -0,0 +1,30 @@+-----------------------------------------------------------------------------+-- |+-- Name        :  Flow2Dot+-- Copyright   :  (c) Dmitry Astapov, 2007-2009+-- License     :  BSD-style (see the file LICENSE)+--+-- Maintainer  :  Dmitry Astapov <dastapov@gmail.com>+-- Stability   :  beta+-- Portability :  portable+--+-----------------------------------------------------------------------------+module Main where++import Text.FlowDiagram+import System (getArgs)++main :: IO ()+main = do+  args <- getArgs+  case args of+       [fname] -> process fname+       _ -> do print "Usage: flow2dot file.flow > file.dot"+++-- | Process a .flow file and output generated .dot diagram+process :: FilePath -> IO ()+process fname = do+  flow <- parseFlowFromFile fname+  putStrLn $ flow2dot flow+