Skip to content

Commit

Permalink
remove dependencies on cond from --> macro
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jan 31, 2024
1 parent 4b5037c commit e25ad66
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 1 addition & 3 deletions dist/std.min.scm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions dist/std.scm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/std.xcb
Binary file not shown.
12 changes: 7 additions & 5 deletions lib/bootstrap.scm
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@
`(let* ((,obj ,expr))
,@(map (lambda (code)
(let* ((value (gensym "value"))
(name (cond ((quoted-symbol? code) (symbol->string (cadr code)))
((pair? code) (symbol->string (car code)))
(true code)))
(name (if (quoted-symbol? code)
(symbol->string (cadr code))
(if (pair? code)
(symbol->string (car code))
code)))
(accessor (if (string? name)
`(. ,obj ,@(split "." name))
`(. ,obj ,name)))
Expand Down Expand Up @@ -494,7 +496,7 @@
;; unit tests run from 1min to 6min.
;; TODO: test this when syntax macros are compiled before evaluation
;; -----------------------------------------------------------------------------
(define-syntax cond
#;(define-syntax cond
(syntax-rules (=> else)

((cond (else else1 else2 ...))
Expand Down Expand Up @@ -533,7 +535,7 @@
Macro for condition checks. For usage instead of nested ifs.")

;; -----------------------------------------------------------------------------
(define-syntax cond/maybe-more
#;(define-syntax cond/maybe-more
(syntax-rules ()
((cond/maybe-more test consequent)
(if test
Expand Down

0 comments on commit e25ad66

Please sign in to comment.