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
I tried to write an Ocaml program in a scripting style, but I realized merlin (version 4.12-501) does not work with toplevel directives. The simplest example would be
I'm new to the language, and I have the feeling that this isn't how serious ocaml projects are designed to be run. But it's still useful for simple scripts and test out things.
The text was updated successfully, but these errors were encountered:
SleepyMug
changed the title
merlin give syntax error on #use directive (or #require)
merlin gives syntax error on #use directive (or #require)
Nov 18, 2023
For instance, #use "thing" seems to be replaceable with Topdirs.dir_use Format.std_formatter "thing".
In fact this is even better because you can use OCaml expressions, including variables, to build the file name : I am a fan of Topdirs.dir_directory ("/path-to-precompiled-files/ ^ Sys.ocaml_version), which lets me put *.cmo files for different OCaml versions in their respectives directories.
I tried to write an Ocaml program in a scripting style, but I realized merlin (version 4.12-501) does not work with toplevel directives. The simplest example would be
The program I was trying to do looks like this
I'm new to the language, and I have the feeling that this isn't how serious ocaml projects are designed to be run. But it's still useful for simple scripts and test out things.
The problem is similar to #1023 .
The text was updated successfully, but these errors were encountered: