caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Hiding a public module/type?
@ 2008-11-03 21:35 David Teller
  2008-11-03 23:38 ` [Caml-list] " Martin Jambon
  0 siblings, 1 reply; 3+ messages in thread
From: David Teller @ 2008-11-03 21:35 UTC (permalink / raw)
  To: OCaml

     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. 


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

end of thread, other threads:[~2008-11-10 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-03 21:35 Hiding a public module/type? David Teller
2008-11-03 23:38 ` [Caml-list] " Martin Jambon
2008-11-10 14:04   ` David Teller

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).