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've run into an issue, but quite possibly I'm just missing something and it's supposed to be this way.
Specifically, if I have first.ml:
let x ="Hi"
And second.ml:
openFirstlet _ = print_endline x
Then ocaml-lsp gives me an "Unbound module" error on the open line in second.ml. If I compile First using ocamlc -c first.ml, producing first.cmo and first.cmi, then the error goes away.
I'd expect ocaml-lsp to be able to find the module whether it's compiled or not, because the correctness of the code doesn't depend on that first module being compiled. Is that right? Or am I missing something about how all of this is supposed to work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've run into an issue, but quite possibly I'm just missing something and it's supposed to be this way.
Specifically, if I have
first.ml
:And
second.ml
:Then
ocaml-lsp
gives me an "Unbound module" error on theopen
line insecond.ml
. If I compileFirst
usingocamlc -c first.ml
, producingfirst.cmo
andfirst.cmi
, then the error goes away.I'd expect
ocaml-lsp
to be able to find the module whether it's compiled or not, because the correctness of the code doesn't depend on that first module being compiled. Is that right? Or am I missing something about how all of this is supposed to work?Thanks for any help or advice.
Beta Was this translation helpful? Give feedback.
All reactions