vacuum-cairo 0.3 → 0.3.1
raw patch · 2 files changed
+17/−7 lines, 2 filesdep +directorydep ~basedep ~vacuum
Dependencies added: directory
Dependency ranges changed: base, vacuum
Files
- System/Vacuum/Cairo.hs +9/−1
- vacuum-cairo.cabal +8/−6
System/Vacuum/Cairo.hs view
@@ -38,6 +38,7 @@ import Data.Char import qualified Control.Exception as C +import System.Directory import Control.Concurrent.MVar.Strict import System.IO.Unsafe import Control.Parallel.Strategies@@ -158,6 +159,8 @@ ,"W8#" ,"W16#" ,"W32#" ,"W64#"] -> showLit n -- chars "C#" -> show . chr . fromIntegral . head . nodeLits $ n+ "D#" -> "Double"+ "F#" -> "Float" -- bytestrings "PS" -> printf "ByteString[%d,%d]" (nodeLits n !! 1) (nodeLits n !! 2)@@ -181,7 +184,12 @@ let dot = render. myPpDot . (showHNodes myStyle) $ vacuum a -- TODO check for path- svgstring <- myReadProcess "dot" ["-Tsvg"] dot+ mdot <- findExecutable "dot" + let exe = case mdot of+ Nothing -> error "\"dot\" executable not found. Please install graphviz"+ Just p -> p++ svgstring <- myReadProcess exe ["-Tsvg"] dot svg <- C.svgNewFromString svgstring writeFile "/tmp/demo" svgstring
vacuum-cairo.cabal view
@@ -1,5 +1,5 @@ name: vacuum-cairo-version: 0.3+version: 0.3.1 cabal-version: >= 1.2 build-type: Simple license: BSD3@@ -26,13 +26,15 @@ <http://code.haskell.org/~dons/images/vacuum/intmap.png> library- build-depends: base >= 3,- vacuum >= 0.0.5,+ build-depends: base >= 3 && < 4,+ vacuum >= 0.0.5.1, gtk,- parallel,- strict-concurrency, cairo, svgcairo, process,- pretty+ pretty,+ directory,+ parallel,+ strict-concurrency+ exposed-modules: System.Vacuum.Cairo