caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Custom toplevel and ocamlbuild
@ 2015-11-24 16:58 Armaël Guéneau
  2015-11-24 17:14 ` Jeremie Dimino
  0 siblings, 1 reply; 5+ messages in thread
From: Armaël Guéneau @ 2015-11-24 16:58 UTC (permalink / raw)
  To: caml-list

Hi list,

I was trying to build a custom toplevel, bundled with my custom
modules, and encountered a few issues.

Following the last advice given by gasche on this reddit post
https://www.reddit.com/r/ocaml/comments/3qjs1q/utop_is_a_much_better_toplevel_than_ocaml_if_you/cwisrrj
I copy-pasted the files from examples/custom-utop, added a foo.ml file
containing "let x = 3", and added "Foo" at the end of myutop.mltop.

Then, if I compile the custom toplevel using the provided Makefile
(which simply uses ocamlbuild and the builtin rule for .mltop files, I
guess), the toplevel produced does not have access to the Foo module.

However, if I manually build using ocamlfind ocamlmktop:

   ocamlfind ocamlmktop -o myutop -thread -linkpkg -package utop foo.cmo 
myutop_main.cmo

this time, it works, and `myutop` has access to Foo.

Is the default ocamlbuild rule for building .mltop files missing some
option?  Am I doing something wrong?

— Armaël

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-24 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-24 16:58 [Caml-list] Custom toplevel and ocamlbuild Armaël Guéneau
2015-11-24 17:14 ` Jeremie Dimino
2015-11-24 17:42   ` Armaël Guéneau
2015-11-24 17:48     ` Jeremie Dimino
2015-11-24 17:52       ` Armaël Guéneau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).