Issue #331 - Prevent syntax error during eval

Prevent an unquoted symbol from throwing a syntax error when evaluating a define-record-type form. Note there are still other issues with creating a record type in the interpreter at this time.
This commit is contained in:
Justin Ethier 2019-08-05 14:09:14 -04:00
parent 1edb877c5f
commit ec25eddc28

View file

@ -1921,9 +1921,7 @@
,parent
',(map car fields)))
;; predicate
(,_define ,pred (,(rename 'make-type-predicate)
,pred ;(symbol->string pred) ;(identifier->symbol pred))
,name))
(,_define ,pred (,(rename 'make-type-predicate) 0 ,name))
;; fields
,@(map (lambda (f)
(and (pair? f) (pair? (cdr f))