[racket] examples of hooking a #lang into DrRacket?
Currently, `read-language` does return #f when `get-info` is not
available. I'm not sure anymore whether that was intended, but since it
has worked that way for a while, and since the intent of
`read-language` is to report the `get-info` function, then I think the
way forward here is to fix the documentation.
It sounds like DrRacket is handling a `#f` result ok: it should only
support syntax coloring if a language specifies a 'color-lexer
configuration via `get-info`, and so if `get-info` is not provided,
then no 'color-lexer configuration is available. Or is `get-info`
provided and somehow not recognized?
At Sun, 20 Jul 2014 18:50:06 -0500, Robby Findler wrote:
> It appears that read-language can return #f and what DrRacket does in
> that case appears to be what you're seeing. Is that what you're
> getting?
>
> The docs say that read-language never returns #f (presumably it is
> allowed to return #f when fail-thunk returns #f, but the relevant
> fail-thunk here doesn't return #f) so I'm not sure if that's a docs
> bug, in which case I should change drracket to cope with it or an
> implementation bug.
>
> But if I create a pollen directory, use 'rack pkg --link pollen' to
> set it up and then put main.rkt with this content:
>
> #lang racket/base
> (module reader racket/base (provide read-syntax)
> (define (read-syntax a b)
> #'(module m racket/base)))
>
> then I see this:
>
> $ racket
> Welcome to Racket v6.1.0.3.
> > (read-language (open-input-string "#lang pollen"))
> #f
>
>
> Robby
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users