Skip to content

Commit

Permalink
cptypes: fix arity in primitive reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
gus-massa authored and mflatt committed Jan 22, 2021
1 parent d0e97d5 commit db4ddf9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions s/cptypes.ss
Original file line number Diff line number Diff line change
Expand Up @@ -1284,12 +1284,13 @@ Notes:
(define (fold-primref/next preinfo pr e* ctxt oldtypes plxc)
(let-values ([(t e* r* t* t-t* f-t*)
(map-Expr/delayed e* oldtypes plxc)])
(let ([ret (primref->result-predicate pr (length e*))])
(let* ([len (length e*)]
[ret (primref->result-predicate pr len)])
(let-values ([(ret t)
(let loop ([e* e*] [r* r*] [n 0] [ret ret] [t t])
(if (null? e*)
(values ret t)
(let ([pred (primref->argument-predicate pr n (length e*) #t)])
(let ([pred (primref->argument-predicate pr n len #t)])
(loop (cdr e*)
(cdr r*)
(fx+ n 1)
Expand Down

0 comments on commit db4ddf9

Please sign in to comment.