Better solution to the toplevel printing bug.

original commit: bc4a7df94d199ac036087b778f22c434d276c0f6
This commit is contained in:
Vincent St-Amour 2011-05-17 18:00:54 -04:00
parent 303c4913bc
commit a724f07dc3
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
#;
(
silent-dead-branch.rkt 12:0 (let-values () (quote 1)) -- dead then branch
silent-dead-branch.rkt line 12 col 0 - (let-values () (quote 1)) - dead then branch
)
#lang typed/racket

View File

@ -16,11 +16,11 @@
#:when (tautology? #'tst)
#:with opt
(begin (log-optimization "dead else branch" #'els)
#`(begin (void #,((optimize) #'tst))
#,((optimize) #'thn))))
#`(#%expression (begin #,((optimize) #'tst)
#,((optimize) #'thn)))))
(pattern (if tst:expr thn:expr els:expr)
#:when (contradiction? #'tst)
#:with opt
(begin (log-optimization "dead then branch" #'thn)
#`(begin (void #,((optimize) #'tst))
#,((optimize) #'els)))))
#`(#%expression (begin #,((optimize) #'tst)
#,((optimize) #'els))))))