mirror of
https://github.com/false-schemers/skint.git
synced 2024-12-26 21:58:51 +01:00
built-in (skint hidden) lib for hidden names
This commit is contained in:
parent
9d9c95b6e2
commit
458328c43f
2 changed files with 9 additions and 1 deletions
|
@ -1854,7 +1854,7 @@
|
|||
(define *root-name-registry* (make-name-registry 300))
|
||||
|
||||
; nonpublic registry for all hidden skint names (used by built-in macros)
|
||||
(define *hidden-name-registry* (make-name-registry 1))
|
||||
(define *hidden-name-registry* (make-name-registry 1)) ; 1 to share bindings w/(skint hidden)
|
||||
|
||||
(define (builtin-sr-environment id at)
|
||||
(cond [(new-id? id) (new-id-lookup id at)]
|
||||
|
@ -2027,6 +2027,10 @@
|
|||
(name-install! *hidden-name-registry* (caar lst) (cdar lst))
|
||||
(loop prev (cdr lst))]))))
|
||||
|
||||
; make hidden bindings available via (skint hidden) library
|
||||
(name-install! *root-name-registry* '(skint hidden)
|
||||
(make-location (make-library '(begin) (vector-ref *hidden-name-registry* 0))))
|
||||
|
||||
; private registry for names introduced in repl
|
||||
(define *user-name-registry* (make-name-registry 200))
|
||||
|
||||
|
|
4
t.c
4
t.c
|
@ -1297,6 +1297,10 @@ char *t_code[] = {
|
|||
"}{.2d,:2,:1V5}${.4ad,.5aa,@(y22:*hidden-name-registry*),@(y13:name-ins"
|
||||
"tall!)[03}.2d,.2,:0^[32}.!0.0^_1[02}'1,.1+,:3^[11}.!0.0^_1[01}_1_1_1_1",
|
||||
|
||||
"C", 0,
|
||||
"${'0,@(y22:*hidden-name-registry*)V4,'(l1:y5:begin;),V12b,'(l2:y5:skin"
|
||||
"t;y6:hidden;),@(y20:*root-name-registry*),@(y13:name-install!)[03}",
|
||||
|
||||
"C", 0,
|
||||
"${'(i200),@(y18:make-name-registry)[01}@!(y20:*user-name-registry*)",
|
||||
|
||||
|
|
Loading…
Reference in a new issue