From 1cdf171251a56baf0867b65a95c9bd59801ff912 Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 11 Sep 2009 13:45:34 +0000 Subject: polish the PGF API and make Expr and Type abstract types. Tree is a type synonym of Expr --- src/PGF/VisualizeTree.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/PGF/VisualizeTree.hs') 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" -- cgit v1.2.3