On Fri, Aug 18, 2017 at 7:08 PM,  <hiph...@openmailbox.org> wrote:
>
> Here is an idea of what a plugin registration function could look like:
>
>   (define (load-plugins paths)
>     ;; Process one plugin at a time
>     (define (load-plugin path)
>       ;; Add the path (or its stem) to the search paths
>       ;; Require the plugin (the plugin should register itself)
>       )
>     (vector-map load-plugin paths)
>     "Loaded plugins")
>
> The sequence of paths was received from Nvim as a vector, and I map over
> every path, requiring the module/collection. The problem is that I
> cannot use (require (file path)) because the require is not a top- or
> module level. The question is: what can I do instead?

I think you want `dynamic-require`:
[http://docs.racket-lang.org/reference/Module_Names_and_Loading.html?q=dynamic-require#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29]

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

Reply via email to