Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/georgefst/prettyprinter-graphviz
Haskell functions for rendering pretty GraphViz labels.
https://github.com/georgefst/prettyprinter-graphviz
graphviz prettyprinter
Last synced: 18 days ago
JSON representation
Haskell functions for rendering pretty GraphViz labels.
- Host: GitHub
- URL: https://github.com/georgefst/prettyprinter-graphviz
- Owner: georgefst
- License: bsd-3-clause
- Created: 2020-01-16T10:57:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-02T23:13:09.000Z (almost 3 years ago)
- Last Synced: 2024-04-26T01:02:23.853Z (9 months ago)
- Topics: graphviz, prettyprinter
- Language: Haskell
- Homepage: http://hackage.haskell.org/package/prettyprinter-graphviz
- Size: 35.2 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
GraphViz pretty-printing
===================================Just some simple utility functions for hooking up the Haskell libraries [graphviz](https://hackage.haskell.org/package/graphviz) and [prettyprinter](https://hackage.haskell.org/package/prettyprinter).
Given a [Doc](https://hackage.haskell.org/package/prettyprinter/docs/Data-Text-Prettyprint-Doc.html#t:Doc), you can use [render](https://hackage.haskell.org/package/prettyprinter-graphviz/docs/Data-Text-Prettyprint-Doc-Render-GraphViz.html#v:render) to transform it to a GraphViz [Label](https://hackage.haskell.org/package/graphviz/docs/Data-GraphViz-Attributes-Complete.html#t:Label). If you are using a different annotation type (eg. something more abstract), then you can define a mapping to GraphViz HTML attributes, and `fmap` it over your `Doc`.
![Example](https://raw.github.com/georgefst/prettyprinter-graphviz/master/example.svg)