From 512d7feeb915376c090aedaf64e8209689becd2a Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Tue, 8 Jun 2021 13:26:10 -0400
Subject: Added type information when logging compiled definitions.

---
 lux-bootstrapper/src/lux/analyser/lux.clj     | 7 +++++--
 lux-bootstrapper/src/lux/compiler/jvm/lux.clj | 6 ++----
 2 files changed, 7 insertions(+), 6 deletions(-)

(limited to 'lux-bootstrapper')

diff --git a/lux-bootstrapper/src/lux/analyser/lux.clj b/lux-bootstrapper/src/lux/analyser/lux.clj
index b7d78aa23..63bc675de 100644
--- a/lux-bootstrapper/src/lux/analyser/lux.clj
+++ b/lux-bootstrapper/src/lux/analyser/lux.clj
@@ -562,8 +562,11 @@
         =meta (&&/analyse-1 analyse &type/Code ?meta)
         ==meta (eval! (optimize =meta))
         def-value (compile-def ?name (optimize =value) ==meta exported?)
-        _ &type/reset-mappings]
-    (return (&/T [module-name (&&/expr-type* =value) def-value]))))
+        _ &type/reset-mappings
+        :let [def-type (&&/expr-type* =value)
+              _ (println 'DEF (str module-name &/+name-separator+ ?name
+                                   " : " (&type/show-type def-type)))]]
+    (return (&/T [module-name def-type def-value]))))
 
 (defn analyse-def [analyse optimize eval! compile-def ?name ?value ?meta exported?]
   (|do [_ (analyse-def* analyse optimize eval! compile-def ?name ?value ?meta exported?)]
diff --git a/lux-bootstrapper/src/lux/compiler/jvm/lux.clj b/lux-bootstrapper/src/lux/compiler/jvm/lux.clj
index 043fc2273..515bd8db5 100644
--- a/lux-bootstrapper/src/lux/compiler/jvm/lux.clj
+++ b/lux-bootstrapper/src/lux/compiler/jvm/lux.clj
@@ -295,8 +295,7 @@
                       (return nil)))
                 :let [_ (.visitEnd =class)]
                 _ (&&/save-class! def-name (.toByteArray =class))
-                def-value (install-def! class-loader current-class module-name ?name ?body ?meta exported?)
-                :let [_ (println 'DEF (str module-name &/+name-separator+ ?name))]]
+                def-value (install-def! class-loader current-class module-name ?name ?body ?meta exported?)]
             (return def-value)))
 
         _
@@ -322,8 +321,7 @@
                     (return nil)))
               :let [_ (.visitEnd =class)]
               _ (&&/save-class! def-name (.toByteArray =class))
-              def-value (install-def! class-loader current-class module-name ?name ?body ?meta exported?)
-              :let [_ (println 'DEF (str module-name &/+name-separator+ ?name))]]
+              def-value (install-def! class-loader current-class module-name ?name ?body ?meta exported?)]
           (return def-value))))))
 
 (defn compile-program [compile ?program]
-- 
cgit v1.2.3