Fix contract on App.
Fix function construction for rec-lambda/check Re-enable printing. svn: r13687
This commit is contained in:
parent
14475467b2
commit
cc1265fc61
|
@ -43,7 +43,7 @@
|
||||||
;; rator is a type
|
;; rator is a type
|
||||||
;; rands is a list of types
|
;; rands is a list of types
|
||||||
;; stx is the syntax of the pair of parens
|
;; stx is the syntax of the pair of parens
|
||||||
(dt App ([rator Type?] [rands (listof Type?)] [stx syntax?])
|
(dt App ([rator Type?] [rands (listof Type?)] [stx (or/c #f syntax?)])
|
||||||
[#:intern (list rator rands)]
|
[#:intern (list rator rands)]
|
||||||
[#:frees (combine-frees (map free-vars* (cons rator rands)))
|
[#:frees (combine-frees (map free-vars* (cons rator rands)))
|
||||||
(combine-frees (map free-idxs* (cons rator rands)))]
|
(combine-frees (map free-idxs* (cons rator rands)))]
|
||||||
|
|
|
@ -285,11 +285,11 @@
|
||||||
(define (tc/rec-lambda/check form formals body name args ret)
|
(define (tc/rec-lambda/check form formals body name args ret)
|
||||||
(with-lexical-env/extend
|
(with-lexical-env/extend
|
||||||
(syntax->list formals) args
|
(syntax->list formals) args
|
||||||
(let ([t (->* args ret)])
|
(let* ([t (make-arr args ret)]
|
||||||
|
[ft (make-Function (list t))])
|
||||||
(with-lexical-env/extend
|
(with-lexical-env/extend
|
||||||
(list name) (list t)
|
(list name) (list ft)
|
||||||
(begin (tc-exprs/check (syntax->list body) ret)
|
(begin (tc-exprs/check (syntax->list body) ret) ft)))))
|
||||||
(make-Function (list t)))))))
|
|
||||||
|
|
||||||
;(trace tc/mono-lambda)
|
;(trace tc/mono-lambda)
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@
|
||||||
[(_ val)
|
[(_ val)
|
||||||
#'(? (lambda (x) (equal? val x)))])))
|
#'(? (lambda (x) (equal? val x)))])))
|
||||||
|
|
||||||
(define-for-syntax printing? #f)
|
(define-for-syntax printing? #t)
|
||||||
|
|
||||||
(define print-type* (box (lambda _ (error "print-type* not yet defined"))))
|
(define print-type* (box (lambda _ (error "print-type* not yet defined"))))
|
||||||
(define print-effect* (box (lambda _ (error "print-effect* not yet defined"))))
|
(define print-effect* (box (lambda _ (error "print-effect* not yet defined"))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user