mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
PGFService.hs: fix type error caused by change to PGF.graphvizParseTree
Note that some of the graphviz functions have backwards incompatible changes that might also affect other clients of the PGF run-time library. Also added graphvizDefaults and export it together with GraphvizOptions from the PGF run-time library.
This commit is contained in:
@@ -122,6 +122,8 @@ module PGF(
|
|||||||
graphvizBracketedString,
|
graphvizBracketedString,
|
||||||
graphvizAlignment,
|
graphvizAlignment,
|
||||||
gizaAlignment,
|
gizaAlignment,
|
||||||
|
GraphvizOptions(..),
|
||||||
|
graphvizDefaults,
|
||||||
|
|
||||||
-- * Probabilities
|
-- * Probabilities
|
||||||
Probabilities,
|
Probabilities,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
module PGF.VisualizeTree
|
module PGF.VisualizeTree
|
||||||
( GraphvizOptions(..)
|
( GraphvizOptions(..)
|
||||||
|
, graphvizDefaults
|
||||||
, graphvizAbstractTree
|
, graphvizAbstractTree
|
||||||
, graphvizParseTree
|
, graphvizParseTree
|
||||||
, graphvizParseTreeOld
|
, graphvizParseTreeOld
|
||||||
@@ -58,6 +59,8 @@ data GraphvizOptions = GraphvizOptions {noLeaves :: Bool,
|
|||||||
leafEdgeStyle :: String
|
leafEdgeStyle :: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
graphvizDefaults = GraphvizOptions False False False "" "" "" "" "" ""
|
||||||
|
|
||||||
|
|
||||||
-- | Renders abstract syntax tree in Graphviz format
|
-- | Renders abstract syntax tree in Graphviz format
|
||||||
graphvizAbstractTree :: PGF -> (Bool,Bool) -> Tree -> String
|
graphvizAbstractTree :: PGF -> (Bool,Bool) -> Tree -> String
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ outputGraphviz code =
|
|||||||
_ -> "application/binary"
|
_ -> "application/binary"
|
||||||
|
|
||||||
abstrTree pgf tree = PGF.graphvizAbstractTree pgf (True,True) tree
|
abstrTree pgf tree = PGF.graphvizAbstractTree pgf (True,True) tree
|
||||||
parseTree pgf lang tree = PGF.graphvizParseTree pgf lang tree
|
parseTree pgf lang tree = PGF.graphvizParseTree pgf lang PGF.graphvizDefaults tree
|
||||||
alignment pgf tree = PGF.graphvizAlignment pgf (PGF.languages pgf) tree
|
alignment pgf tree = PGF.graphvizAlignment pgf (PGF.languages pgf) tree
|
||||||
|
|
||||||
pipeIt2graphviz :: String -> String -> IO BS.ByteString
|
pipeIt2graphviz :: String -> String -> IO BS.ByteString
|
||||||
|
|||||||
Reference in New Issue
Block a user