Also there's some history, IIRC: Early on, multi collection packages
were the only kind. Even an actively maintained package might stick
with this, to continue to support older versions of Racket. Same story
for info.rkt files using #lang setup/infotab instead of #lang info.
--
You received this
I should've been clear that the loop example was taken from the
Chicken scheme wiki. Same for the while example mentioned in the
email:
https://wiki.call-cc.org/man/4/Macros#ir-macro-transformer
Using the syntax->datum here would drop lexical information though; if
the syntax object given to the m
Thanks for the responses. In case anybody is interested, I came up with the
following implementation. Since (at least in this simple implementation)
there is an obvious symmetry between explicit renaming and implicit
renaming I added the er-macro-transformer also. They seem to work
correctly. O
I think the following program illustrates the idea, though it doesn't
really work:
#lang racket
(begin-for-syntax
(define (syntax-pair->cons stx)
(define datum (syntax-e stx))
(cond
[(list? datum)
(map syntax-pair->cons datum)]
[(pair? datum)
(cons (syntax-pair
The gui-lib might be an example. It provides modules spanning
different collections such as racket/gui, framework/ and mrlib/.
https://github.com/racket/gui/tree/master/gui-lib
On Wed, Aug 29, 2018 at 7:13 AM, Erich Rast wrote:
> On Wed, 29 Aug 2018 06:46:49 -0500
> Philip McGrath wrote:
>
>
>>
For future reference, you should try the wonderful macro stepper in
DrRacket, which shows you exactly how expansion happens. It can even handle
buggy, non-terminating examples like the version of `test` you wrote.
-Philip
On Wed, Aug 29, 2018 at 7:20 AM Philip McGrath
wrote:
> I'm not familiar
I'm not familiar with how `ir-macro-transformer` is supposed to work, but
your macro is currently fails for essentially the same reason as:
(define-syntax (diverge stx)
stx
The `expr` given to `test` is a syntactic list beginning with the
identifier `test`, so including it in the output triggers
On Wed, 29 Aug 2018 06:46:49 -0500
Philip McGrath wrote:
> You don't need a multi-collection package to do this. If your
> structure is:
>
> appy/
> |
> |--info.rkt
> |--main.rkt
> |--gui.rkt
> |--…
>
> Then `(require appy)` will import "main.rkt" and `(require appy/gui)`
> will import "gui.rk
Hi,
while syntax-case has some advantages, I was trying to implement a Chicken
style ir-macro-transformer in Racket so that I can write macros that will
run both on Racket and systems like Chicken/Chibi Scheme.
My first attempt was as follows:
(begin-for-syntax
(require (for-syntax racket/b
On Wed, Aug 29, 2018 at 6:29 AM Erich Rast wrote:
> The reason why I want this to be a multi-collection package is that the
> framework without anything gui-related is fairly small and should be
> required by default as (require appy). The GUI-related extensions on
> the other hand import and re-
Thanks a lot Philip and Ryan! Splitting up the info.rkt file worked
fine.
The reason why I want this to be a multi-collection package is that the
framework without anything gui-related is fairly small and should be
required by default as (require appy). The GUI-related extensions on
the other hand
On 08/29/2018 12:37 PM, Erich Rast wrote:
I have a preliminary scribbling for the manual
of a multi source package, but it doesn't show up in Racket's main
documentation when I install the package locally.
Here is the directory structure:
appy
|
|--info.rkt
|--appy
|
|--
|--scribbli
I have a preliminary scribbling for the manual
of a multi source package, but it doesn't show up in Racket's main
documentation when I install the package locally.
Here is the directory structure:
appy
|
|--info.rkt
|--appy
|
|--
|--scribblings
|
|--manual.scrbl
And "info.rk
13 matches
Mail list logo