On 11/16/2016 07:51 PM, Vincent St-Amour wrote:
FWIW, Eric Dobson wrote a very nice `define-literal-syntax-class` macro
that is used extensively inside TR.
https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt
Its companion `define-merged-syntax-class` is quite nice too.
https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/optimizer/utils.rkt#L110
I've used those in other projects as well, and like them a lot.
Ryan: Would you consider adding them (or something like them) to
syntax/parse?
I could add a `#:define-syntax-class name` option to
`define-literal-set` that would additionally define `name` as a
syntax-class matching any of the literals. I would want to wait to add
that until I implement the backtracking-aware handling of
disappeared-uses, which I just haven't gotten to yet.
For `define-merged-syntax-class`, I don't think I would put it in core
syntax/parse, but maybe as a library in syntax/parse/lib/*.
Ryan
--
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.