# Main file name of module in https://pkgs.racket-lang.org/

**URL:** <https://racket.discourse.group/t/main-file-name-of-module-in-https-pkgs-racket-lang-org/2856>\
**Category:** Questions & Answers\
**Created:** [April 5, 2024, 12:11pm UTC](https://racket.discourse.group/t/main-file-name-of-module-in-https-pkgs-racket-lang-org/2856 "2024-04-05T12:11:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![damien\_mattei](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/damien_mattei/32/2706_2.png) [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Post date:** [April 5, 2024, 12:11pm UTC](https://racket.discourse.group/t/main-file-name-of-module-in-https-pkgs-racket-lang-org/2856/1 "2024-04-05T12:11:19Z")

</div>

Bonjour,

i have a question about Racket's package.

First due to another answer in a thread i have to say,once and only,that i do not respond to false answer about any of my project that would lead to polemic's long and unecessary discussion.

I'm not here to have polemic discussion, this is not my interest.  
(Even more when solution are written in non standart scheme (not RnRS) that i can not reuse in another scheme implementation and are of no use for me as i intend to write portable code.)

Now my question about module in [https://pkgs.racket-lang.org/](https://pkgs.racket-lang.org/) .  
i have a directory, supposing name foo containing bar.rkt which is a racket module.  
when i download it from [https://pkgs.racket-lang.org/](https://pkgs.racket-lang.org/) i can use it only this way:

(require foo/bar)

this works. But it has the constrainst to be directory/filename . For example if i convert the project in R6RS i will use (import (foo bar) ...  
i just want like any other module to be able to do :  
(require foo) in Racket  
or in R6RS (import (foo) ...

i find this is working , as raco require the filename of module to be always main.rkt.  
That is if i rename bar.rkt in main.rkt it works.

but is there a way to change that, i want to keep my custom project main filename to bar.rkt for example ,not main.rkt.

Is there a way to configure the package ,in info.rkt file ? or anywhere to do that?

Regards,

---

<div class="post-metadata">

**Author:** ![greghendershott](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/greghendershott/32/98_2.png) [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Post date:** [April 5, 2024, 2:38pm UTC](https://racket.discourse.group/t/main-file-name-of-module-in-https-pkgs-racket-lang-org/2856/2 "2024-04-05T14:38:18Z")

</div>

As far as I know:

Bad news: You'll need to supply a `main.rkt`.

Good news: It can just re-provide `bar.rkt`. For example:

```scheme
#lang racket/base
(require "bar.rkt")
(provide (all-from-out "bar.rkt"))

```

This is actually a fairly common practice in Racket libraries -- to have a `main.rkt` that does nothing but re-provide other modules. Sometimes everything from a module (`all-from-out`), or sometimes just select items.

(There's even a `#lang reprovide` to make this less verbose. 😄)

p.s. Another convention is to have many modules under a `private` directory. This signals to people that, although they can require stuff from there, it's "at their own risk"; it's implementation details that someday might change or disappear. Whereas normally the convention in Racket is to be backward compatible, forever. So `main.rkt` is sort of "public API.rkt".

Anyway, I mention this as another example where the `main.rkt` exists solely to re-provide things.

---

<div class="post-metadata">

**Author:** ![damien\_mattei](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/damien_mattei/32/2706_2.png) [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Post date:** [April 10, 2024, 1:10pm UTC](https://racket.discourse.group/t/main-file-name-of-module-in-https-pkgs-racket-lang-org/2856/3 "2024-04-10T13:10:42Z")

</div>

i wanted to make it the Racket way:

the main.rkt :

```scheme
#lang reprovide
"src/Scheme+.rkt"

```

i waited the auto-packaging to be done to be sure it worked and it is just successfully packaged:

> **[Scheme-PLUS-for-Racket](https://pkgs.racket-lang.org/package/Scheme-PLUS-for-Racket)**
>
> Scheme+ version 8.3.1 for Racket as module : infix notation with operator precedence, overloading for binary and n-arity operators and for procedures.

forgot to say i had to add reprovide-lang-lib in the info.rkt file:

```scheme
(define deps '("base"
	       "srfi-lib"
	       "sci"
	       "r6rs-lib"
	       "reprovide-lang-lib"))

```
