cleaning up
This commit is contained in:
parent
7a5a8311b9
commit
3959a0a95c
12
compile.rkt
12
compile.rkt
|
@ -774,14 +774,8 @@
|
|||
[(and (LocalRef? exp)
|
||||
(not (LocalRef-unbox? exp)))
|
||||
(let ([entry (list-ref cenv (LocalRef-depth exp))])
|
||||
(printf "~s\n" entry)
|
||||
(cond
|
||||
[(StaticallyKnownLam? entry)
|
||||
entry]
|
||||
[(Const? entry)
|
||||
entry]
|
||||
[else
|
||||
'?]))]
|
||||
entry)]
|
||||
|
||||
[(ToplevelRef? exp)
|
||||
(let: ([name : (U Symbol False ModuleVariable)
|
||||
(list-ref (Prefix-names (ensure-prefix (list-ref cenv (ToplevelRef-depth exp))))
|
||||
|
@ -791,8 +785,10 @@
|
|||
name]
|
||||
[else
|
||||
'?]))]
|
||||
|
||||
[(Constant? exp)
|
||||
(make-Const (Constant-v exp))]
|
||||
|
||||
[else
|
||||
'?]))
|
||||
|
||||
|
|
|
@ -303,6 +303,11 @@ EOF
|
|||
"4\n5\n16\n")
|
||||
|
||||
|
||||
(test/exn '(let ([x 0])
|
||||
(set! x "foo")
|
||||
(add1 x))
|
||||
"Error: Expected number as argument 1 but received foo")
|
||||
|
||||
|
||||
#;(test (read (open-input-file "tests/conform/program0.sch"))
|
||||
(port->string (open-input-file "tests/conform/expected0.txt")))
|
Loading…
Reference in New Issue
Block a user