* [Caml-list] a question about compiler-libs and Ocaml toplevel
@ 2018-03-11 10:49 Matej Košík
2018-03-12 9:24 ` Matej Košík
0 siblings, 1 reply; 4+ messages in thread
From: Matej Košík @ 2018-03-11 10:49 UTC (permalink / raw)
To: caml-list
Hi,
When I load compiler-libs
#require "compiler-libs.common";;
then I can use various modules contained therein, but not "Location".
(which is referenced from "Parsetree")
Something like:
open Location;;
or
Location.none;;
fails with:
Error: Unbound module Location
It seems that I am missng something very basic.
Why can't "Location" be used when "compiler-libs.common" package was loaded?
(While other modules (which use "Location") can be used in the toplevel just fine.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] a question about compiler-libs and Ocaml toplevel
2018-03-11 10:49 [Caml-list] a question about compiler-libs and Ocaml toplevel Matej Košík
@ 2018-03-12 9:24 ` Matej Košík
2018-03-12 10:15 ` Leo White
0 siblings, 1 reply; 4+ messages in thread
From: Matej Košík @ 2018-03-12 9:24 UTC (permalink / raw)
To: caml-list
Sorry, the correct way to reproduce the problem is this:
In an OCaml toplevel
(* following the advice in the documentation
* http://caml.inria.fr/pub/docs/manual-ocaml/parsing.html *)
# #load "compiler-libs/ocamlcommon.cma";;
(* Now, if I try to actually use some of the modules that are supposed
* to be provided by this library always leads to a failure. For example: *)
# open Parsetree;;
Error: Unbound module Parsetree
I'd like to ask if this is a bug or I just don't understand something.
(Btw. loading compiler-libs via ocamlfind mechanisms works fine. No surprises there.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] a question about compiler-libs and Ocaml toplevel
2018-03-12 9:24 ` Matej Košík
@ 2018-03-12 10:15 ` Leo White
2018-03-12 10:46 ` Matej Košík
0 siblings, 1 reply; 4+ messages in thread
From: Leo White @ 2018-03-12 10:15 UTC (permalink / raw)
To: caml-list
Aren't you just missing:
#directory "+compiler-libs";;
to make the cmi files available?
Regards,
Leo
On Mon, 12 Mar 2018, at 5:24 AM, Matej Košík wrote:
> Sorry, the correct way to reproduce the problem is this:
>
> In an OCaml toplevel
>
> (* following the advice in the documentation
> * http://caml.inria.fr/pub/docs/manual-ocaml/parsing.html *)
>
> # #load "compiler-libs/ocamlcommon.cma";;
>
> (* Now, if I try to actually use some of the modules that are supposed
> * to be provided by this library always leads to a failure. For example: *)
>
> # open Parsetree;;
> Error: Unbound module Parsetree
>
> I'd like to ask if this is a bug or I just don't understand something.
>
> (Btw. loading compiler-libs via ocamlfind mechanisms works fine. No
> surprises there.)
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] a question about compiler-libs and Ocaml toplevel
2018-03-12 10:15 ` Leo White
@ 2018-03-12 10:46 ` Matej Košík
0 siblings, 0 replies; 4+ messages in thread
From: Matej Košík @ 2018-03-12 10:46 UTC (permalink / raw)
To: caml-list
On 03/12/18 11:15, Leo White wrote:
> Aren't you just missing:
>
> #directory "+compiler-libs";;
>
> to make the cmi files available?
Yes. That worked. Thank you.
I always forget that when I #load a thing, it does not mean that I can actually start using it.
(If *.cmi files do not happen to be "in the path", then I will just get not super helpful message:
Error: Unbound module XY
which is the same one as if I havened #loaded anything.
)
Sorry.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-12 10:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-11 10:49 [Caml-list] a question about compiler-libs and Ocaml toplevel Matej Košík
2018-03-12 9:24 ` Matej Košík
2018-03-12 10:15 ` Leo White
2018-03-12 10:46 ` Matej Košík
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox