Add no-check language

This commit is contained in:
Sam Tobin-Hochstadt 2008-09-10 14:49:15 -04:00
parent 5ac64589ba
commit c7b51cfd2d
3 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,5 @@
#lang scheme/base
(require "private/prims.ss")
(provide (all-from-out scheme/base)
(all-from-out "private/prims.ss"))

View File

@ -0,0 +1,13 @@
#lang scheme/base
(require (prefix-in r: "../../typed-reader.ss")
(only-in syntax/module-reader wrap-read-all))
(define (*read in modpath line col pos)
(wrap-read-all 'typed-scheme/no-check in r:read modpath #f line col pos))
(define (*read-syntax src in modpath line col pos)
(wrap-read-all
'typed-scheme/no-check in (lambda (in) (r:read-syntax src in))
modpath src line col pos))
(provide (rename-out [*read read] [*read-syntax read-syntax]))

View File

@ -95,7 +95,8 @@
;; typecheck an expression, but throw away the effect
;; tc-expr/t : Expr -> Type
(define (tc-expr/t e) (match (tc-expr e)
[(tc-result: t) t]))
[(tc-result: t) t]
[t (int-err "tc-expr returned ~a, not a tc-result, for ~a" t (syntax->datum e))]))
(define (tc-expr/check/t e t)
(match (tc-expr/check e t)