Skip to content

Commit

Permalink
Merge pull request #594 from epatters/fix_acset_type_docstring
Browse files Browse the repository at this point in the history
Docstrings not attached to acset types
  • Loading branch information
epatters authored Jan 28, 2022
2 parents 51321e6 + 3a6685f commit d4a180f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/categorical_algebra/CSetDataStructures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,10 @@ macro acset_type(head)
Expr(:call, name, schema, idx_args...) => (name, schema, idx_args)
_ => error("Unsupported head for @acset_type")
end
abstract_name = Symbol("Abstract" * string(name))
# We assign this to an anonymous variable so that there is something
# to attach documentation to.
# TODO: this is a hack and there should be a better way
quote
tmp = $(esc(:eval))($(GlobalRef(CSetDataStructures, :struct_acset))(
$(esc(:eval))($(GlobalRef(CSetDataStructures, :struct_acset))(
$(Expr(:quote, name)), $(Expr(:quote, parent)), $(esc(schema)), $(idx_args...)))
Core.@__doc__ $(esc(name))
end
end

Expand Down

0 comments on commit d4a180f

Please sign in to comment.