diff options
| author | krasimir <krasimir@chalmers.se> | 2009-09-11 13:45:34 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-09-11 13:45:34 +0000 |
| commit | 1cdf171251a56baf0867b65a95c9bd59801ff912 (patch) | |
| tree | 837e65fa23f3041c3bbf4b7f1dbfcf63990e09a1 /src/PGF/VisualizeTree.hs | |
| parent | 28a7c4b5c7659dc18166e06e914fb0a81c1c43bc (diff) | |
polish the PGF API and make Expr and Type abstract types. Tree is a type synonym of Expr
Diffstat (limited to 'src/PGF/VisualizeTree.hs')
| -rw-r--r-- | src/PGF/VisualizeTree.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PGF/VisualizeTree.hs b/src/PGF/VisualizeTree.hs index 8871e9f84..bf21ff581 100644 --- a/src/PGF/VisualizeTree.hs +++ b/src/PGF/VisualizeTree.hs @@ -19,7 +19,7 @@ module PGF.VisualizeTree ( visualizeTrees, alignLinearize ,PosText(..),readPosText ) where -import PGF.CId (prCId) +import PGF.CId (showCId) import PGF.Data import PGF.Tree import PGF.Linearize @@ -42,14 +42,14 @@ tree2graph pgf (funs,cats) = prf [] where concat [prf (j:ps) t | (j,t) <- zip [0..] trees] prn ps cid = let - fun = if funs then prCId cid else "" + fun = if funs then showCId cid else "" cat = if cats then prCat cid else "" colon = if funs && cats then " : " else "" lab = "\"" ++ fun ++ colon ++ cat ++ "\"" in (show(show (ps :: [Int])),lab) pra i nod t@(Fun cid _) = nod ++ arr ++ fst (prn i cid) ++ " [style = \"solid\"];" arr = " -- " -- if digr then " -> " else " -- " - prCat = prCId . lookValCat pgf + prCat = showCId . lookValCat pgf prGraph digr ns = concat $ map (++"\n") $ [graph ++ "{\n"] ++ ns ++ ["}"] where graph = if digr then "digraph" else "graph" |
