haphviz 0.1.2.1 → 0.2.0.0
raw patch · 3 files changed
+8/−8 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
- Text.Dot.Gen: cluster :: Text -> DotGen () -> DotGen GraphName
+ Text.Dot.Gen: cluster :: Text -> DotGen a -> DotGen (GraphName, a)
- Text.Dot.Gen: cluster_ :: Text -> DotGen () -> DotGen ()
+ Text.Dot.Gen: cluster_ :: Text -> DotGen a -> DotGen a
- Text.Dot.Gen: subgraph :: Text -> DotGen () -> DotGen GraphName
+ Text.Dot.Gen: subgraph :: Text -> DotGen a -> DotGen (GraphName, a)
Files
- haphviz.cabal +1/−1
- src/Text/Dot/Gen.hs +6/−6
- src/Text/Dot/Render.hs +1/−1
haphviz.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: haphviz-version: 0.1.2.1+version: 0.2.0.0 synopsis: Graphviz code generation with Haskell description: There are multiple ways to describe this package:
src/Text/Dot/Gen.hs view
@@ -228,23 +228,23 @@ -- | Cluster with a given name -- -- The @cluster_@ prefix is taken care of.-cluster :: Text -> DotGen () -> DotGen GraphName+cluster :: Text -> DotGen a -> DotGen (GraphName, a) cluster name = subgraph $ "cluster_" <> name -- | Like 'cluster', discarding the graph name.-cluster_ :: Text -> DotGen () -> DotGen ()-cluster_ name subgraph = void $ cluster name subgraph+cluster_ :: Text -> DotGen a -> DotGen a+cluster_ name subgraph = snd <$> cluster name subgraph -- | Subgraph declaration -- -- This is rarely useful. Just use 'cluster'.-subgraph :: Text -> DotGen () -> DotGen GraphName+subgraph :: Text -> DotGen a -> DotGen (GraphName, a) subgraph name content = do n <- get- let (((), newn), dot) = genSubDot' n content+ let ((a, newn), dot) = genSubDot' n content tell $ Subgraph name dot put newn- return name+ return (name, a) -- * Miscelaneous -- ** Rankdir
src/Text/Dot/Render.hs view
@@ -149,7 +149,7 @@ renderDecType :: DecType -> Render () renderDecType DecGraph = tell "graph" renderDecType DecNode = tell "node"-renderDotType DecEdge = tell "edge"+renderDecType DecEdge = tell "edge" renderRankDirType :: RankdirType -> Render () renderRankDirType TB = tell "TB"