Skip to content

Commit

Permalink
Fix the use of native Lisp symbols as Treep symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiostalla committed Mar 16, 2024
1 parent e7eb13a commit 2ccd9ab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/level0/abstractions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@
slots))))
',name))

;;Basic forms
(defconstant +symbol-abstraction+ (intern "abstraction" +symbol-treep+))
(defconstant +symbol-abstraction-direct-superclasses+ (intern "direct-superclasses" +symbol-abstraction+))
(defconstant +symbol-abstraction-slot+ (intern "slot" +symbol-abstraction+))
(defconstant +symbol-abstraction-slots+ (intern "slots" +symbol-abstraction+))
(defconstant +symbol-name+ (intern "name" +symbol-treep+))
(defconstant +symbol-namespace+ (intern "namespace" +symbol-treep+))
(defconstant +symbol-namespace-search-path+ (intern "search-path" +symbol-namespace+))
(defconstant +symbol-quote+ (intern "quote" +symbol-treep+))
(defconstant +symbol-seq+ (intern "seq" +symbol-treep+))
(defconstant +symbol-seq-elements+ (intern "elements" +symbol-seq+))
(defconstant +symbol-with+ (intern "with" +symbol-treep+))
(defconstant +symbol-with-value+ (intern "value" +symbol-with+))
;; Basic forms.
;; These ought to be constant but SBCL complains about redefinition because they're not identical between compile-time and load-time
;; TODO rewrite these as imports of Lisp symbols
(defvar +symbol-abstraction+ (intern "abstraction" +symbol-treep+))
(defvar +symbol-abstraction-direct-superclasses+ (intern "direct-superclasses" +symbol-abstraction+))
(defvar +symbol-abstraction-slot+ (intern "slot" +symbol-abstraction+))
(defvar +symbol-abstraction-slots+ (intern "slots" +symbol-abstraction+))
(defvar +symbol-name+ (intern "name" +symbol-treep+))
(defvar +symbol-namespace+ (intern "namespace" +symbol-treep+))
(defvar +symbol-namespace-search-path+ (intern "search-path" +symbol-namespace+))
(defvar +symbol-quote+ (intern "quote" +symbol-treep+))
(defvar +symbol-seq+ (intern "seq" +symbol-treep+))
(defvar +symbol-seq-elements+ (intern "elements" +symbol-seq+))
(defvar +symbol-with+ (intern "with" +symbol-treep+))
(defvar +symbol-with-value+ (intern "value" +symbol-with+))

(define-abstraction quote +symbol-quote+ ()
((form :initarg :form :reader quoted-form)))
Expand Down
1 change: 1 addition & 0 deletions src/level0/forms.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
(find-class 'effective-form-slot-definition))

;; These ought to be constant but SBCL complains about redefinition because they're not identical between compile-time and load-time
;; TODO rewrite these as imports of Lisp symbols
(defvar +symbol-form+ (intern "form" +symbol-treep+))
(defvar +symbol-form-parent+ (intern "parent" +symbol-form+))

Expand Down

0 comments on commit 2ccd9ab

Please sign in to comment.