[plt-scheme] "broken compiled code" error
Hi all. I'm trying to create a language module that behaves like
FrTime, but performs some static optimization on the FrTime program.
I've come across an error that I don't understand. Here's a code
snippet that triggers the error:
(module funtime mzscheme
(require (only (lib "frtime.ss" "frtime") seconds))
(provide seconds)
(define-syntax (fun-module-begin stx)
(syntax-case stx ()
[(_ expr)
#`(#%module-begin #,(expand-syntax #'expr))]))
(provide (rename fun-module-begin #%module-begin)
#%top #%app #%datum))
(module broken funtime
seconds) <---- the error highlights this line
The error is:
require: broken compiled code (phase 0, defn-phase 0): cannot find
module |,c:\program files\plt\collects\frtime\lang-ext| in: seconds
I'm using version 350, on windows xp.
The error happens iff the re-exported symbol ("seconds" in this case)
comes from a require statement that involves a directory name, such as
(lib "frtime.ss" "frtime") or (lib "html.ss" "html"). In contrast,
(lib "list.ss") doesn't trigger the problem, and neither do standard
mzscheme identifiers.
Another way to make the error go away is to remove the call to
expand-syntax. Unfortunately that part is essential to my approach.
Anybody have a suggestion?
--
Kimberley Burchett
http://www.kimbly.com/