be more reasonable about constructor contract checking (#522)

This commit is contained in:
Andrew Kent 2017-03-29 19:15:22 -04:00 committed by GitHub
parent 52b4507585
commit 52caac26e8

View File

@ -262,12 +262,9 @@
[raw-constructor-name raw-constructor-name]
[raw-constructor-contract raw-constructor-contract]
[(struct-fields ...) struct-fields])
#'(define/cond-contract (constructor-name struct-fields ...)
constructor-contract
(define/cond-contract constructor-name
raw-constructor-contract
raw-constructor-name)
. body))))
#'(define (constructor-name struct-fields ...)
(let ([constructor-name raw-constructor-name])
. body)))))
;; definer parser for functions who operate on Reps. Fields are automatically bound
;; to the struct-field id names in the body. An optional self argument can be specified.
(define-syntax-class (generic-transformer struct-fields)