The template is merely an accessory for a source file being rendered. 
Everything in the template (including relative path strings) will be evaluated 
as if it were in the source file already. AFAICT this is consistent with how we 
usually expect relative path strings to behave. You hint that you'd prefer 
"utils.rkt" to resolve as if it were an absolute path, but that seems more 
contrarian.

If you don't like putting things in pollen.rkt — you say "pollute" but that is 
its raison d'être — then you could also make a helper package that can be 
invoked as `(local-require sorawee/utils)`.




> On Dec 19, 2018, at 1:54 PM, sora...@cs.washington.edu wrote:
> 
> It doesn't seem to be possible to local-require local files in a template. 
> Consider:

> 
> The reason why I want to local-require local files is that there are a lot of 
> functions that are only specific to the template file. Putting those in 
> pollen.rkt would solve the problem, but it would pollute the environment 
> unnecessarily.

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to