Handle arbitrary recursive contracts generated from Rec
types.
original commit: 1dca82784b664e7640053333fec85980159cbd16
This commit is contained in:
parent
073263527c
commit
60b0b0faaa
|
@ -1,5 +1,5 @@
|
|||
#;
|
||||
(exn-pred exn:fail:contract? ".*expected: T.*" #rx".*contract.*\\(->.*")
|
||||
(exn-pred exn:fail:contract? ".*pair?.*" #rx".*contract.*\\(->.*")
|
||||
|
||||
#lang scheme/load
|
||||
|
||||
|
|
|
@ -214,7 +214,8 @@
|
|||
(match-let ([(Mu-name: n-nm _) ty])
|
||||
(with-syntax ([(n*) (generate-temporaries (list n-nm))])
|
||||
(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]
|
||||
[(Instance: (Class: _ _ (list (list name fcn) ...)))
|
||||
(when flat? (exit (fail)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user