On Tue, Jul 12, 2016 at 4:50 PM, 'John Clements' via Racket Users <racket-users@googlegroups.com> wrote: > > So, I have two questions: > > 1) Why doesn’t the optimization coach locate the unreachable code in this > example? Perhaps it’s too small?
TR doesn't prove that the else branch is unreachable. I think what's happening is that TR doesn't feed enough information from the result _type_ [here, (U #t 'odd 'even)] to the result _proposition_ (which is what tells it if the branch is unreachable). Here's an even smaller example: #lang typed/racket (: process-number : -> Symbol) (define (process-number) (if (add1 5) 'both-odd "x")) I've reported it as https://github.com/racket/typed-racket/issues/400 > 2) Is there some nice user interface that we could use to make the warnings > visible to the case of the user? Maybe a “I think I have a bug, can I see the > compilation warnings” button? I agree -- I think we need a better story generally for warning UI in Racket, but I don't know what the right solution is. Sam -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.