Both functions create a new Module which is afterwards accessible via .current_module().
Functions created with hlo_func or local_func will automatically register into the
current module.
The module is finalized when a function named "main" is returned via hlo_return.
Differences between the two functions:
local_moduleremoves the module when exiting the current scope, whereashlo_moduledoes not.hlo_modulediscards the previously built module(s), whereaslocal_moduledoes not.
Usage
hlo_module()
local_module(envir = parent.frame())Arguments
- envir
(
environment)
Environment where exit handler will be registered for cleaning up theModuleif it was not finalized yet.
Value
A Module object.