Closed jonascarpay closed 1 year ago
I have been looking for something like this for a long time!
An idea that I'd love to join with it would be to mark identifiers with a Haddock metadata so that only them are picked by Calligraphy. This would be useful to only show "domain-level" operations to non-technical people, with the beautiful Mermaid output. :)
Oh, that's a neat idea! I don't really know or remember off the top of my head how much Haddock makes its way into HIE output, do you have any idea?
Unfortunately the .hie files don't hold any documentation, it's all in .hi files according to @fendor
@jonascarpay I'll try to give a stab to the Mermaid backend! I'll use the tasty framework to have unit and golden tests :+1:
Nice! Let me know if you need help/input on anything. The trickiest thing is probably untangling the graphviz-specific parts and the more general parts of the rendering logic. Maybe it's useful to create an intermediate representation that's easy to render for both mermaid and graphviz?
Yes, I'm going to do some internal refactoring. Ideas welcome when it comes to internal representations of flowcharts, I'm not exactly an expert in the field :)
I started sketching out an internal representation, but I'm now so far along I might as well get it compiling and to a point where you should be able to adapt it pretty easily to a mermaid renderer. PR coming soon, I hope I didn't accidentally duplicate any of your efforts.
Nope! I'm very eager to learn from you as well :)
GitHub markdown now supports inline Mermaid flowchart diagrams:
If
calligraphy
were to output Mermaid directly, you could easily e.g. include call graphs in your documentation or PRs. It shouldn't be too tricky, and it seems extremely useful.