Add type tooltip information in TR modules

This PR uses the newly added DrRacket API for communicating tooltip information to show the types of expressions in the DrRacket definitions area.
When the syntax object doesn't have a source location then you don't want
to register it's types.

I also think you should check the other fields (span and position). In
general it is not guaranteed that a non-#f source field implies non-#f span
and position fields. (Altho it won't happen unless you have a misbehaved
macro (I think).)

Robby

On Mon, Oct 6, 2014 at 8:31 AM, Sam Tobin-Hochstadt <
notifications@github.com> wrote:

> In
> pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/type-table.rkt:
>
> > @@ -62,6 +65,53 @@
> >                                          (syntax-line e)
> >                                          (syntax-column e))))))
> >
> > +;; Convert the contents of the type table to a format that check-syntax
> > +;; can understand in order to draw type tooltips
> > +(define (type-table->tooltips)
> > +  (for/fold ([tooltips '()])
> > +            ([(stx results) (in-hash table)]
> > +             #:when (syntax-source stx))
> > +    ;; #f if we should just skip this results
>
> What does this comment mean?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/plt/racket/pull/787/files#r18456115>.
>