This commit is contained in:
msyds committed 2026-09-20 03:15:32 -06:00
1 parent 35bbd7ffef
commit e5476361c9
1 file changed
+12 -5
+12 -5
View File
@@ -498,11 +498,18 @@
(let [c (atom {})]
(clojure.walk/postwalk
(fn [x]
(if (and (symbol? x) (str/starts-with? (name x) "scope__"))
(let [syms (swap! c #(if (contains? % x)
%
(assoc % x (symbol (str "s" (count %))))))]
(get syms x))
(if (instance? Variable x)
(let [[sym scopes] (destructure-variable x)
syms (swap!
c
#(let [r (set/difference scopes (keys %))]
(into %
(map-indexed
(fn [n a]
[a (symbol (str "s" (+ (dec (count r)) n)))])
r))))]
#_(->Variable sym (set (map #(get syms %) scopes)))
[sym (set (map #(get syms %) scopes))])
x))
datum)))