This isn't really a for loop specific problem -- any complicated macro
could run into this, and so we need a more general solution.

Sam

On Tue, Jul 12, 2016, 6:17 PM Matthias Felleisen <matth...@ccs.neu.edu>
wrote:

>
> Alex is working on for loops in general, using a suggestion from Asumu.
>
>
>
> > On Jul 12, 2016, at 6:13 PM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu>
> wrote:
> >
> > I've opened https://github.com/racket/typed-racket/issues/402 to track
> those issues.
> >
> > What's likely going on is that `for/hash` expands into some code that is
> unreachable, and gives it the source location of the full `for/hash`
> expression. I think we can do a better job with avoiding this, though.
> >
> > Sam
> >
> > On Tue, Jul 12, 2016 at 5:56 PM Matthias Felleisen <matth...@ccs.neu.edu>
> wrote:
> >
> > Sorry, I really should have said “for/* loops are a mess in types.”
> >
> > Otherwise the OC is a tool you should use for optimization hunting,
> > not type error hunting.
> >
> >
> > > On Jul 12, 2016, at 5:54 PM, Robby Findler <
> ro...@eecs.northwestern.edu> wrote:
> > >
> > > I think you are saying that TR does not declare variables in for/hash
> > > as dead code but that OC does. Is that what you're saying? Is that
> > > true?
> > >
> > > Robby
> > >
> > > On Tue, Jul 12, 2016 at 4:51 PM, Matthias Felleisen
> > > <matth...@ccs.neu.edu> wrote:
> > >>
> > >> The coach is different from the type checker.
> > >>
> > >> I think that the type checker should use these colors only when type
> > >> checking succeeds, and in that case, I’d consider the colors highly
> > >> useful.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>> On Jul 12, 2016, at 5:46 PM, Robby Findler <
> ro...@eecs.northwestern.edu> wrote:
> > >>>
> > >>> That would require too mcuh work and also be ugly, IMO. :)
> > >>>
> > >>> I think that an on-mouseover option would be too hard to discover.
> > >>>
> > >>> John raises a good point.
> > >>>
> > >>> Robby
> > >>>
> > >>>
> > >>> On Tue, Jul 12, 2016 at 4:42 PM, Sam Tobin-Hochstadt
> > >>> <sa...@cs.indiana.edu> wrote:
> > >>>> I hesitate to suggest it as well, but what about the little red
> > >>>> squiggles seen in editors/word processors/etc?
> > >>>>
> > >>>> But I'm happy with any of these options.
> > >>>>
> > >>>> Sam
> > >>>>
> > >>>> On Tue, Jul 12, 2016 at 5:38 PM, Robby Findler
> > >>>> <ro...@eecs.northwestern.edu> wrote:
> > >>>>> Yes.
> > >>>>>
> > >>>>> I hesitate to suggest it, but would a background color on the text
> be
> > >>>>> the way to go? I find that a bit on the annoying side, tho.
> > >>>>>
> > >>>>> You could use an existing pipeline to do something like the unused
> > >>>>> require highlighting (which requires mouseover).
> > >>>>>
> > >>>>> Robby
> > >>>>>
> > >>>>> On Tue, Jul 12, 2016 at 4:36 PM, Sam Tobin-Hochstadt
> > >>>>> <sa...@cs.indiana.edu> wrote:
> > >>>>>> Could this be an API like the one for tooltips? IOW, some sort of
> general
> > >>>>>> warning with a message and a syntax location?
> > >>>>>>
> > >>>>>> Sam
> > >>>>>>
> > >>>>>> On Tue, Jul 12, 2016 at 5:34 PM Robby Findler <
> ro...@eecs.northwestern.edu>
> > >>>>>> wrote:
> > >>>>>>>
> > >>>>>>> I think it would be straightforward to add something to Check
> Syntax
> > >>>>>>> that reported unreachable code and that seems pretty cool and
> useful
> > >>>>>>> for TR. So CS could report any code that TR could prove was
> > >>>>>>> unreachable and yet the code came from the original program. I
> guess
> > >>>>>>> if John had seen that showing up in his program it might have
> prompted
> > >>>>>>> him to figure out what the bug was?
> > >>>>>>>
> > >>>>>>> Robby
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> On Tue, Jul 12, 2016 at 4:13 PM, Matthias Felleisen
> > >>>>>>> <matth...@ccs.neu.edu> wrote:
> > >>>>>>>>
> > >>>>>>>>> On Jul 12, 2016, at 5:07 PM, Sam Tobin-Hochstadt <
> sa...@cs.indiana.edu>
> > >>>>>>>>> wrote:
> > >>>>>>>>>
> > >>>>>>>>>>
> > >>>>>>>>>> 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.
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> [Sorry John, I overlooked your questions.]
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> Instead of watching warnings scroll by in some widget, I’d
> rather see
> > >>>>>>>> the coloring solution for testing from the teaching languages
> adapted to TR.
> > >>>>>>>>
> > >>>>>>>> At a minimum, I could see two colors:
> > >>>>>>>>
> > >>>>>>>> RED: you’re typed. Blessed. You’re wonderful.
> > >>>>>>>> BLUE: you’re bad. Untyped. My propositions hate you.
> > >>>>>>>>
> > >>>>>>>> Or something like that. I could see the use of four or five
> colors even.
> > >>>>>>>> But starting with two would be a _good thing_.
> > >>>>>>>>
> > >>>>>>>> More brainstorming ideas?
> > >>>>>>>>
> > >>>>>>>> --
> > >>>>>>>> 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.
> > >>>>>>>
> > >>>>>>> --
> > >>>>>>> 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.
> > >>>>>
> > >>>>> --
> > >>>>> 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.
> > >>>>
> > >>>> --
> > >>>> 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.
> > >>
> > >> --
> > >> 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.
> >
>
>

-- 
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.

Reply via email to