mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-04 03:36:36 +02:00
procedure-signature should strip synclos from parameters
This commit is contained in:
parent
8cf38672cf
commit
7e634f3b66
1 changed files with 5 additions and 1 deletions
|
@ -305,13 +305,17 @@
|
|||
;;> remaining arguments are the parameter types.
|
||||
|
||||
(define (procedure-signature x . o)
|
||||
(define (map* f ls)
|
||||
(cond ((pair? ls) (cons (f (car ls)) (map* f (cdr ls))))
|
||||
((null? ls) '())
|
||||
(else (f ls))))
|
||||
(define (ast-sig x)
|
||||
(cond
|
||||
((lambda? x)
|
||||
(cons (lambda-return-type x)
|
||||
(if (pair? (lambda-param-types x))
|
||||
(lambda-param-types x)
|
||||
(lambda-params x))))
|
||||
(map* identifier->symbol (lambda-params x)))))
|
||||
((seq? x) (ast-sig (last (seq-ls x))))
|
||||
((and (pair? x) (lambda? (car x))) (ast-sig (lambda-body (car x))))
|
||||
;; TODO: improve the type inference so this isn't needed
|
||||
|
|
Loading…
Add table
Reference in a new issue