We have to be careful here -- for example, one of the test cases was failing

because the last thing in the instantiate was a function type, which is
a cons.  Look for a cons whose cdr is an identifier.
This commit is contained in:
Stevie Strickland 2008-07-12 22:11:23 -04:00
parent eed2c37495
commit ab2360384f

View File

@ -76,7 +76,7 @@
;; use instantiate-poly-dotted, otherwise we do the normal thing.
(let-values ([(all-but-last last-stx) (split-last (syntax->list inst))])
(match (syntax-e last-stx)
[(cons last-ty-stx last-id-stx)
[(cons last-ty-stx (? identifier? last-id-stx))
(unless (Dotted? (lookup (current-tvars) (syntax-e last-id-stx) (lambda _ #f)))
(tc-error/stx last-id-stx "~a is not a type variable bound with ..." (syntax-e last-id-stx)))
(let* ([last-id (syntax-e last-id-stx)]