AlgebraicJulia / GATlab.jl

GATlab: a computer algebra system based on generalized algebraic theories (GATs)
https://algebraicjulia.github.io/GATlab.jl/
MIT License
23 stars 2 forks source link

Docstrings on generators in a theory #78

Open olynch opened 1 year ago

olynch commented 1 year ago

In Catlab, docstrings on the generators in a theory are saved to the theory structure. We should support this in Gatlab too.

jpfairbanks commented 11 months ago

@olynch did you know about dynamic docstrings?

https://docs.julialang.org/en/v1/manual/documentation/#Dynamic-documentation

You can have a method that dynamically constructs the docstring from values in the instance of a type. If there is ever a time for that, I think the docstring of a theory including a presentation of the theory is a perfect fit.

olynch commented 11 months ago

Waaaaaaat that would be so cool.

jpfairbanks commented 11 months ago

Yeah that also blew my mind when reading the docs on docs. I think that Documenter.jl will pull that into the docs live so our docs for the stdlib could just be an autogenerated HTML page with all the presentations typeset with latex.

It also avoids having to insert metaprogramming derived docstrings into the macroexpanded code.