From 37a9044d8ec523a282c0470d65380ce5cff27084 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 23 Aug 2015 20:27:51 -0400 Subject: - Restructuring how sums & products work [part 3] --- src/lux/analyser/lux.clj | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/lux/analyser/lux.clj') diff --git a/src/lux/analyser/lux.clj b/src/lux/analyser/lux.clj index f7ed07ee4..20e435eb3 100644 --- a/src/lux/analyser/lux.clj +++ b/src/lux/analyser/lux.clj @@ -209,7 +209,11 @@ (&/|list)) (&/|reverse inner) scopes)] ((|do [btype (&&/expr-type =local) - _ (&type/check exo-type btype)] + ;; :let [_ (prn 'analyse-local/_0 name) + ;; _ (prn 'analyse-local/_1 name (&type/show-type exo-type) (&type/show-type btype))] + _ (&type/check exo-type btype) + ;; :let [_ (prn 'analyse-local/_2 name 'CHECKED)] + ] (return (&/|list =local))) (&/$set-envs (&/|++ inner* outer) state)))) )))) @@ -273,14 +277,14 @@ macro-expansion #(-> macro (.apply ?args) (.apply %)) ;; :let [_ (prn 'MACRO-EXPAND|POST (&/ident->text real-name))] ;; :let [macro-expansion* (&/|map (partial with-cursor form-cursor) macro-expansion)] - ;; :let [_ (when (or (= "defsig" (aget real-name 1)) - ;; ;; (= "type" (aget real-name 1)) - ;; ;; (= &&/$struct r-name) - ;; ) - ;; (->> (&/|map &/show-ast macro-expansion) - ;; (&/|interpose "\n") - ;; (&/fold str "") - ;; (prn (&/ident->text real-name))))] + :let [_ (when (or (= "using" (aget real-name 1)) + ;; (= "type" (aget real-name 1)) + ;; (= &&/$struct r-name) + ) + (->> (&/|map &/show-ast macro-expansion) + (&/|interpose "\n") + (&/fold str "") + (prn (&/ident->text real-name))))] ] (&/flat-map% (partial analyse exo-type) macro-expansion)) -- cgit v1.2.3