Skip to content

Commit f7ef99b

Browse files
committed
fix clause[*].expand
1 parent f98a5d9 commit f7ef99b

File tree

1 file changed

+5
-3
lines changed
  • typed-racket-lib/typed-racket/base-env

1 file changed

+5
-3
lines changed

typed-racket-lib/typed-racket/base-env/prims.rkt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ the typed racket language.
603603
(begin-for-syntax
604604
(define-values (define-for/hash:-variant define-for*/hash:-variant)
605605
(let ()
606-
(define ((make for/folder:) hash-maker)
606+
(define ((make for*? for/folder:) hash-maker)
607607
(lambda (stx)
608608
(syntax-parse stx
609609
[(_ a1:optional-standalone-annotation*
@@ -614,11 +614,13 @@ the typed racket language.
614614
(quasisyntax/loc stx
615615
(#,for/folder: : #,a.ty
616616
((return-hash : #,a.ty (ann (#,hash-maker null) #,a.ty)))
617-
(clause.expand ... ...)
617+
(if for*?
618+
(clause.expand* ... ...)
619+
(clause.expand ... ...))
618620
(let-values (((key val) (let () body ...)))
619621
(hash-set return-hash key val))))])))
620622

621-
(values (make #'for/fold:) (make #'for*/fold:)))))
623+
(values (make #f #'for/fold:) (make #t #'for*/fold:)))))
622624

623625
(define-syntax for/hash: (define-for/hash:-variant #'make-immutable-hash))
624626
(define-syntax for/hasheq: (define-for/hash:-variant #'make-immutable-hasheq))

0 commit comments

Comments
 (0)