From: "Armaël Guéneau" <armael.gueneau@ens-lyon.fr>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] Custom toplevel and ocamlbuild
Date: Tue, 24 Nov 2015 16:58:07 +0000 [thread overview]
Message-ID: <5654971F.2070006@ens-lyon.fr> (raw)
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
next reply other threads:[~2015-11-24 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 16:58 Armaël Guéneau [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5654971F.2070006@ens-lyon.fr \
--to=armael.gueneau@ens-lyon.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox