Skip to content

Commit 4db5693

Browse files
committed
Nicer list output
1 parent 3be5b44 commit 4db5693

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ModuleInterfaceTools.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ function Base.show(io::IO, api::AbstractAPI)
7171
println(io, "ModuleInterfaceTools.API: ", api.mod)
7272
for fld in (:base, :public, :develop, :public!, :develop!, :modules)
7373
syms = getfield(api, fld)
74-
isempty(syms) || println(fld, ": ", syms)
74+
isempty(syms) && continue
75+
print(fld, ":")
76+
for s in syms
77+
print(" ", s)
78+
end
79+
println()
80+
println()
7581
end
7682
end
7783

@@ -87,7 +93,6 @@ function m_eval(mod, expr)
8793
#rethrow(ex)
8894
end
8995
end
90-
m_eval(expr) = m_eval(cur_mod(), expr)
9196

9297
"""
9398
@api <cmd> [<symbols>...]
@@ -342,6 +347,7 @@ function _api(curmod::Module, cmd::Symbol, exprs)
342347
if has_api(mod)
343348
for sym in getfield(get_api(mod), :modules)
344349
if isdefined(mod, sym)
350+
println("curmod=$curmod, using $nam.$sym, cpy=$cpy")
345351
m_eval(curmod, :(using $nam.$sym))
346352
cpy && m_eval(curmod, :( push!(__tmp_api__.modules, $(QuoteNode(sym)) )))
347353
else

0 commit comments

Comments
 (0)