Better types #15

Merged
alex-eg merged 27 commits from better-types into main 2025-10-30 16:05:44 +01:00
2 changed files with 9 additions and 7 deletions
Showing only changes of commit 5379631471 - Show all commits

View File

@@ -2,7 +2,8 @@
(declare (unit semen)
(uses sex-macros
sex-modules))
sex-modules
utils))
(import
(chicken string)
@@ -112,12 +113,6 @@
(semen-walk-form (car new-form) walk-fn env)
(semen-walk-form (cdr new-form) walk-fn env)))))))
(define (recons old-cons new-car new-cdr)
(if (and (eq? new-car (car old-cons))
(eq? new-cdr (cdr old-cons)))
old-cons
(cons new-car new-cdr)))
;;; Typdef
(define (process-typedef new-type target acc)

View File

@@ -36,3 +36,10 @@
(list)
lists)
1))
;;; Reconstruct form
(define (recons old-cons new-car new-cdr)
(if (and (eq? new-car (car old-cons))
(eq? new-cdr (cdr old-cons)))
old-cons
(cons new-car new-cdr)))