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
|
||||
;; rands is a list of types
|
||||
;; 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)]
|
||||
[#:frees (combine-frees (map free-vars* (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)
|
||||
(with-lexical-env/extend
|
||||
(syntax->list formals) args
|
||||
(let ([t (->* args ret)])
|
||||
(let* ([t (make-arr args ret)]
|
||||
[ft (make-Function (list t))])
|
||||
(with-lexical-env/extend
|
||||
(list name) (list t)
|
||||
(begin (tc-exprs/check (syntax->list body) ret)
|
||||
(make-Function (list t)))))))
|
||||
(list name) (list ft)
|
||||
(begin (tc-exprs/check (syntax->list body) ret) ft)))))
|
||||
|
||||
;(trace tc/mono-lambda)
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
[(_ val)
|
||||
#'(? (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-effect* (box (lambda _ (error "print-effect* not yet defined"))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user