[wg-camlp4] Structured comments, shallow embeddings and deep quasiquotations

Alain Frisch alain.frisch at lexifi.com
Tue Feb 5 16:43:09 GMT 2013


On 02/05/2013 05:35 PM, Leo White wrote:
> If the extension is part of a module then using it requires you to
> initialise that whole module at compile-time. This includes initialising
> (and so potentially executing) code in the module that is intended for
> run-time.
>
> To prevent this from happening we can simply not allow extensions to be
> part of modules. However, we then have no means of referring to that
> extension. So in order to refer to these extensions we allow them to be
> members of namespaces.

I don't follow.  The problem, as I see it, is not that code for the 
extension is in *some* module, but that it is in the *same* module as 
the unit on which it needs to apply.

Can you clarify how you see compilation/execution being organized in 
your proposal?  Would the code for .mlq would be compiled manually 
before its expanders can be used, or would this compilation happen 
automatically?  Which technology would then be used to run this code 
(Dynlink, static linking, toplevel-like technology for in-process 
compilation/execution)?

Alain


More information about the wg-camlp4 mailing list