File tree 1 file changed +14
-8
lines changed
collects/typed-racket/typecheck
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 150
150
151
151
;; Register the approriate types to the struct bindings.
152
152
(define/cond-contract (register-struct-bindings! sty names desc si)
153
- (c-> Struct? struct-names? struct-desc? (or/c #f struct-info?) void? )
153
+ (c-> Struct? struct-names? struct-desc? (or/c #f struct-info?) (listof def-binding?) )
154
154
155
155
156
156
(define tvars (struct-desc-tvars desc))
203
203
(add-struct-fn! s (make-StructPE poly-base i) #t )
204
204
(cons s (poly-wrapper (->* (list poly-base t) -Void))))
205
205
null))))
206
+
206
207
(add-struct-constructor! (struct-names-constructor names))
207
- (cons
208
- (and si (make-def-struct-stx-binding (struct-names-type-name names) si))
209
- (for/list ([b bindings])
210
- (define id (car b))
211
- (define t (cdr b))
212
- (register-type id t)
213
- (make-def-binding id t))))
208
+
209
+ (define def-bindings
210
+ (for/list ([b bindings])
211
+ (define id (car b))
212
+ (define t (cdr b))
213
+ (register-type id t)
214
+ (make-def-binding id t)))
215
+ (if si
216
+ (cons
217
+ (make-def-struct-stx-binding (struct-names-type-name names) si)
218
+ def-bindings)
219
+ def-bindings))
214
220
215
221
(define (register-parsed-struct-sty! ps)
216
222
(match ps
You can’t perform that action at this time.
0 commit comments