diff --git a/src/syntax/TheoryInterface.jl b/src/syntax/TheoryInterface.jl index 8eb50f9..8de48c6 100644 --- a/src/syntax/TheoryInterface.jl +++ b/src/syntax/TheoryInterface.jl @@ -153,11 +153,13 @@ function theory_impl(head, body, __module__) end doctarget = gensym() + mdp(::Nothing) = [] + mdp(x::Markdown.MD) = x + mdp(x::Base.Docs.DocStr) = Markdown.parse(x.text...) push!(modulelines, Expr(:toplevel, :(module Meta struct T end - @doc ($(Markdown.MD)((@doc $(__module__).$doctarget), $docstr)) const theory = $theory macro theory() $theory end @@ -180,7 +182,7 @@ function theory_impl(head, body, __module__) $(structlines...) end ), - :(@doc ($(Markdown.MD)((@doc $doctarget), $docstr)) $name) + :(@doc ($(Markdown.MD)($mdp(@doc $doctarget), $docstr)) $name) ) ) end diff --git a/test/syntax/TheoryInterface.jl b/test/syntax/TheoryInterface.jl index 652719b..da5ec34 100644 --- a/test/syntax/TheoryInterface.jl +++ b/test/syntax/TheoryInterface.jl @@ -46,7 +46,8 @@ end @op 1 + 1 end -@test (@doc ThCMonoid.Meta.theory) isa Markdown.MD -@test (@doc ThSet) == (@doc ThSet.Meta.theory) +# DEPRECATED +# @test (@doc ThCMonoid.Meta.theory) isa Markdown.MD +# @test (@doc ThSet) == (@doc ThSet.Meta.theory) end