handle empty structs

svn: r9055
This commit is contained in:
Sam Tobin-Hochstadt 2008-03-22 01:37:55 +00:00
parent b7127dc9c7
commit 3552f7f73b

View File

@ -193,7 +193,7 @@
(let* (;; the accessors come in reverse order
[acc (reverse acc)]
;; remove the first element, if it's #f
[acc (if (not (car acc)) (cdr acc) acc)])
[acc (cond [(null? acc) acc] [(not (car acc)) (cdr acc)] [else acc])])
(make-Struct id pred (get-lineage #'s) acc
(if (eq? '_ (syntax-e #'pats))
(map make-Dummy acc)