From 4dd512ad28b39642b5d06aadf148e90daff04a40 Mon Sep 17 00:00:00 2001 From: Michael Camilleri Date: Wed, 20 Jan 2021 10:16:59 +0900 Subject: [PATCH] Use print-module-entry function to display docstring --- src/boot/boot.janet | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index db433287..c6e69b4b 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2848,6 +2848,7 @@ (cond (x :ref) (string :var " (" (type (in (x :ref) 0)) ")") (x :macro) :macro + (x :module) (string :module " (" (x :kind) ": " (x :path) ")") (type (x :value))) "\n")) (def sm (x :source-map)) @@ -2873,9 +2874,12 @@ (def x (dyn sym)) (if (not x) (do - (def [fullpath _] (module/find (string sym))) + (def [fullpath mod-kind] (module/find (string sym))) (if-let [mod-env (in module/cache fullpath)] - (in mod-env :doc) + (print-module-entry {:module true + :path fullpath + :kind mod-kind + :doc (in mod-env :doc)}) (print "symbol " sym " not found."))) (print-module-entry x)))