rel-string module path suffix not added automatically?

29 views
Skip to first unread message

Štěpán Němec

unread,
Aug 20, 2019, 4:10:05 PM8/20/19
to racket...@googlegroups.com

Hello,

I notice that (require "../file.rkt") inside a module (#lang racket,
v7.4) works, but (require "../file") doesn't ("no such file or
directory" error).

As per <https://docs.racket-lang.org/guide/module-paths.html>,
'If the path has no suffix, ".rkt" is added automatically.'

Does the documentation differ from actual behaviour or am I missing
something?

Thank you,

Štěpán

Matthew Flatt

unread,
Aug 21, 2019, 12:39:48 AM8/21/19
to Štěpán Němec, racket...@googlegroups.com
It looks to me like the Guide documentation is wrong there. A ".rkt"
suffix is added for an identifier-form path, like `racket/base`, but
not for a relative-path string like "../file".

Štěpán Němec

unread,
Aug 21, 2019, 5:31:17 AM8/21/19
to Matthew Flatt, racket...@googlegroups.com

[resending to the list; I originally posted via Gmane but the
mail-to-news direction doesn't seem to work, sorry for the
duplication/confusion]

On Wed, 21 Aug 2019 06:39:42 +0200
Matthew Flatt wrote:

> It looks to me like the Guide documentation is wrong there. A ".rkt"
> suffix is added for an identifier-form path, like `racket/base`, but
> not for a relative-path string like "../file".

Thank you for the clarification! I hope someone can correct the
documentation (I would submit a patch same as I'm going to do with some
trivial typos I stumbled upon, but here perhaps some more sophisticated
action is required).

--
Štěpán
Reply all
Reply to author
Forward
0 new messages