You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a powerful ocaml.toplevel.mk modules that eases the following tasks:
Create a toplevel that automatically adds some paths to the include directories.
Create a toplevel that automatically opens some modules.
Create a toplevel that automatically install some custom printers.
Use the toplevel from other parts of the project, to run tests and scripts.
Points 1, 2 and 3 do not need to be solved purely in ocaml.toplevel.mk but it might be useful to define some cooperation guidelines between the toplevel custom code and ocaml.toplevel.mk.
The toplevel should work identically when it is installed and when it is run inside a developper's subshell (see bps.project.mk).
Using Toploop.execute_phrase to initialise the toplevel from the
function assigned to Toploop.toplevel_startup_hook does not work, it
seems that the environment is reset when exiting the hook. Here is an
example illustrating this behaviour:
While the initialisation routine echoes a val zero : int = 0
message, using zero results in an error indicating that zero is
unbound. But in the toplevel, using the command bootstrap() results
in zero being bound to 0 as expected.
We therefore may choose to rely exclusively on initialisation files to configure the toplevel adequately. We need to initialise correctly the toplevel, wether it is used in without being installed or being installed.
The best way to provide this functionality is to prepare a corresponding initialisation file and ensuring it is read at starting time. To ease this, a target display-developer-dirs has been added to the ocaml.toplevel.mk file in 9c85461.
We need a powerful
ocaml.toplevel.mk
modules that eases the following tasks:Points 1, 2 and 3 do not need to be solved purely in
ocaml.toplevel.mk
but it might be useful to define some cooperation guidelines between the toplevel custom code andocaml.toplevel.mk
.The toplevel should work identically when it is installed and when it is run inside a developper's subshell (see
bps.project.mk
).The text was updated successfully, but these errors were encountered: