From: David Teller <David.Teller@univ-orleans.fr>
To: OCaml <caml-list@inria.fr>
Subject: Hiding a public module/type?
Date: Mon, 03 Nov 2008 22:35:57 +0100 [thread overview]
Message-ID: <1225748157.6328.105.camel@Blefuscu> (raw)
Dear list,
In order to simplify the error messages for users of my library, I'd
like to hide some type aliasing.
I have the following:
(*** module [Inner], defined in inner.mli ***)
type t
(*** module [Outer], defined in outer.mli ***)
type t = Inner.t
val f : t -> t
Now, module [Inner] is only useful to define the library and shouldn't
be visible from the outside. Unfortunately, for the moment, whenever a
client makes a type error involving [f], the error message looks like
# f 5;;
^
This expression has type int but is used with type
Outer.t = Inner.t
Is there a simple way of turning this error message into
This expression has type int but is used with type
Outer.t
?
Thanks,
David
--
David Teller-Rajchenbach
Security of Distributed Systems
http://www.univ-orleans.fr/lifo/Members/David.Teller
Angry researcher: French Universities need reforms, but the LRU act
brings liquidations.
next reply other threads:[~2008-11-03 21:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 21:35 David Teller [this message]
2008-11-03 23:38 ` [Caml-list] " Martin Jambon
2008-11-10 14:04 ` David Teller
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=1225748157.6328.105.camel@Blefuscu \
--to=david.teller@univ-orleans.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