There is a lot of magic inside the require macro and
require-transformers. I still don't understand all the details, but I
hope I got most of them right. With some simplifications it's easier
to understand.
First, we create two dummy modules
;--- a.rkt ---
#lang racket
(provide a)
(define a "A!")
This worked — for some reason, moving the '(file ...)' expression into the
`with-syntax` expression made a difference.
(define-syntax (overriding-require+provide-with-prefix stx)
(syntax-case stx () [(_ main override out-prefix)
(let ([path-to-override (path->string (build
I know that a hard-coded absolute path can be used in `require`:
(require (file "/path/to/directory/module.rkt"
But how can a generated path be used? Like so:
(require (file (path->string (build-path (current-directory) "module.rkt"
In particular, I want to `require` the file if it exis
3 matches
Mail list logo