[racket-users] Where to put scribblings in 'multi package?

2018-08-29 Thread Erich Rast
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

Re: [racket-users] Where to put scribblings in 'multi package?

2018-08-29 Thread Ryan Culpepper
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

Re: [racket-users] Where to put scribblings in 'multi package?

2018-08-29 Thread Erich Rast
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

Re: [racket-users] Where to put scribblings in 'multi package?

2018-08-29 Thread Philip McGrath
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-

[racket-users] MIT/Chicken/Chibi Scheme style ir-macro-transformer in Racket

2018-08-29 Thread t791bc via Racket Users
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

Re: [racket-users] Where to put scribblings in 'multi package?

2018-08-29 Thread Erich Rast
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

Re: [racket-users] MIT/Chicken/Chibi Scheme style ir-macro-transformer in Racket

2018-08-29 Thread Philip McGrath
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

Re: [racket-users] MIT/Chicken/Chibi Scheme style ir-macro-transformer in Racket

2018-08-29 Thread Philip McGrath
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

Re: [racket-users] Where to put scribblings in 'multi package?

2018-08-29 Thread Shu-Hung You
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: > > >>

Re: [racket-users] MIT/Chicken/Chibi Scheme style ir-macro-transformer in Racket

2018-08-29 Thread Shu-Hung You
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

Re: [racket-users] MIT/Chicken/Chibi Scheme style ir-macro-transformer in Racket

2018-08-29 Thread t791bc via Racket Users
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

Re: [racket-users] MIT/Chicken/Chibi Scheme style ir-macro-transformer in Racket

2018-08-29 Thread Shu-Hung You
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

Re: [racket-users] Where to put scribblings in 'multi package?

2018-08-29 Thread Greg Hendershott
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