mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 20:45:06 +02:00
Added notes
This commit is contained in:
parent
4356d372d1
commit
b9c411ec5f
1 changed files with 21 additions and 3 deletions
|
@ -122,13 +122,24 @@
|
||||||
|
|
||||||
;; ER macro rename function, based on code from Chibi scheme
|
;; ER macro rename function, based on code from Chibi scheme
|
||||||
(define Cyc-er-rename
|
(define Cyc-er-rename
|
||||||
(lambda (sym) sym)) ; placeholder
|
(lambda (sym) sym)) ; temporary placeholder, see below
|
||||||
; TODO:
|
; TODO:
|
||||||
; ;; TODO: this is not good enough, need to take macro environment
|
; ;; TODO: this is not good enough, need to take macro environment
|
||||||
; ;; into account
|
; ;; into account
|
||||||
can pass useenv in to this guy (and compare as well), and possibly add renamed bindings to it.
|
; can pass useenv in to this guy (and compare as well), and possibly add renamed bindings to it.
|
||||||
would still need to modify expand (and eval?) to deal with those renames??? or maybe not, if only macros are affected??
|
; would still need to modify expand (and eval?) to deal with those renames??? or maybe not, if only macros are affected??
|
||||||
|
|
||||||
|
mac-env is
|
||||||
|
- global env for interpreted macros, at least for now until
|
||||||
|
they can be recognized by eval
|
||||||
|
- ?? for compiled macros
|
||||||
|
|
||||||
|
use-env is:
|
||||||
|
- current env for eval, can be passed in.
|
||||||
|
is this really a-env though? or do we need to extend it when
|
||||||
|
a new lambda scope is introduced?
|
||||||
|
- need to keep track of it for compiled macro expansion
|
||||||
|
;
|
||||||
; ((lambda (renames)
|
; ((lambda (renames)
|
||||||
; (lambda (identifier)
|
; (lambda (identifier)
|
||||||
; ((lambda (cell)
|
; ((lambda (cell)
|
||||||
|
@ -138,6 +149,12 @@
|
||||||
; (set! renames (cons (cons identifier name) renames))
|
; (set! renames (cons (cons identifier name) renames))
|
||||||
; name)
|
; name)
|
||||||
; (gensym identifier)
|
; (gensym identifier)
|
||||||
|
; ; gensym not good enough, need to also preserve ref trans.
|
||||||
|
; ; also note that an identifier can be an object, it does not
|
||||||
|
; ; just have to be a symbol. although, of course, the rest
|
||||||
|
; ; of the code needs to be able to handle identifiers in
|
||||||
|
; ; forms other than symbols, if that is done.
|
||||||
|
; ;
|
||||||
; ;(make-syntactic-closure mac-env '() identifier)
|
; ;(make-syntactic-closure mac-env '() identifier)
|
||||||
; )))
|
; )))
|
||||||
; (assq identifier renames))))
|
; (assq identifier renames))))
|
||||||
|
@ -151,6 +168,7 @@
|
||||||
; (quote . quote)
|
; (quote . quote)
|
||||||
; (set! . set!)
|
; (set! . set!)
|
||||||
; )))
|
; )))
|
||||||
|
|
||||||
(define (Cyc-er-compare? a b)
|
(define (Cyc-er-compare? a b)
|
||||||
;; TODO: this is not good enough, need to determine if these symbols
|
;; TODO: this is not good enough, need to determine if these symbols
|
||||||
;; are the same identifier in their *environment of use*
|
;; are the same identifier in their *environment of use*
|
||||||
|
|
Loading…
Add table
Reference in a new issue