Handle arbitrary recursive contracts generated from Rec
types.
This commit is contained in:
parent
2aaeec4520
commit
1dca82784b
|
@ -1,5 +1,5 @@
|
||||||
#;
|
#;
|
||||||
(exn-pred exn:fail:contract? ".*expected: T.*" #rx".*contract.*\\(->.*")
|
(exn-pred exn:fail:contract? ".*pair?.*" #rx".*contract.*\\(->.*")
|
||||||
|
|
||||||
#lang scheme/load
|
#lang scheme/load
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,8 @@
|
||||||
(match-let ([(Mu-name: n-nm _) ty])
|
(match-let ([(Mu-name: n-nm _) ty])
|
||||||
(with-syntax ([(n*) (generate-temporaries (list n-nm))])
|
(with-syntax ([(n*) (generate-temporaries (list n-nm))])
|
||||||
(parameterize ([vars (cons (list n #'n* #'n*) (vars))])
|
(parameterize ([vars (cons (list n #'n* #'n*) (vars))])
|
||||||
#`(flat-rec-contract n* #,(t->c b #:flat #t)))))]
|
#`(letrec ([n* (recursive-contract #,(t->c b))])
|
||||||
|
n*))))]
|
||||||
[(Value: #f) #'false/c]
|
[(Value: #f) #'false/c]
|
||||||
[(Instance: (Class: _ _ (list (list name fcn) ...)))
|
[(Instance: (Class: _ _ (list (list name fcn) ...)))
|
||||||
(when flat? (exit (fail)))
|
(when flat? (exit (fail)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user