[racket] Redex: re-writing ...?

14 views
Skip to first unread message

Asumu Takikawa

unread,
Oct 11, 2012, 6:38:47 PM10/11/12
to Racket Users
Hi all,

Is there any easy way to globally re-write the ellipsis pattern in Redex
to some other representation of a sequence? (for typesetting)

For example, re-writing
(e ...) to the equivalent of \overline{e}

I couldn't think of a way to do this with lw-rewriters since those
always seem to dispatch on the head of a list. Atomic rewriters also
don't work since they wouldn't let me get the line. Am I missing
anything?

Cheers,
Asumu
____________________
Racket Users list:
http://lists.racket-lang.org/users

Robby Findler

unread,
Oct 11, 2012, 7:57:26 PM10/11/12
to Asumu Takikawa, Racket Users
I don't think that's currently possible.

You might try adding it as an option in the lw->pict function (or
something it calls). Beware, tho, that an ellipsis can have anything
at all inside it, so some care will have to be taken to get it to look
reasonable (I think it doesn't have to look great if the stuff inside
is sufficiently strange, but it should probably at least look
reasonable).

That is, this seems like something that'd be a reasonable option to
have for configuring Redex's typesetting setup.

Robby
Reply all
Reply to author
Forward
0 new messages