This commit is contained in:
msyds committed 2026-09-23 11:18:12 -06:00
1 parent babfed1bb7
commit 5359bc1c0a
2 files changed
+33 -32

No files matched your search

+3 -18
View File
@@ -14,7 +14,7 @@
`(~f ~@(mapcat #(list (keyword %) %)
syms))))
(s/def ::scope symbol?)
(s/def ::scope scm/scope?)
(s/def ::binding
#(match %
@@ -74,10 +74,6 @@
:ss (s/coll-of ::context))
:ret (s/coll-of ::context :kind set?))
(s/fdef new-scope
:args (s/cat :prefix (s/? string?))
:ret ::scope)
;;; prim specs
@@ -107,16 +103,6 @@
(defn new-scope
([] (gensym "scope__"))
([prefix] (gensym (str "scope__" prefix))))
#_
(defn bind-lexical [sym denot store-atom]
(let [bind [:lexical sym (gensym)]]
(swap! store-atom #(assoc % [sym scopes] bind))
{bind denot}))
#_
(s/fdef binding-form
:args (s/cat :binds (s/coll-of (s/tuple symbol? ::denotation))
@@ -125,9 +111,8 @@
(defn binding-form [ident env store-atom binds f]
(let [scopes (conj (scm/syntax-context ident)
(new-scope))
ident* (scm/->Syntax (scm/syntax-e ident)
scopes)
(scm/new-scope))
ident* (scm/->Syntax (scm/syntax-e ident) scopes)
additions (for [[sym denot] binds]
[sym
[:lexical sym (gensym)]