Browse thread
Partially hiding modules in packages
-
Alexey Rodriguez
-
blue storm
- Alexey Rodriguez
- Guillaume Yziquel
- Alain Frisch
- Jean-Christophe_Filliâtre
-
blue storm
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Guillaume Yziquel <guillaume.yziquel@c...> |
| Subject: | Re: [Caml-list] Partially hiding modules in packages |
blue storm a écrit :
>
> Regarding your original problem, I've had the same needs and came up
> with a slightly different solution : in order to avoid the additional
> indirection level related to -pack (Foobar.Foo), is used a flattened
> representation by adding a "foobar.ml" file containing only :
>
> include Foo
>
> (and possibly include of other modules in the package). Then the
> foobarl.mli is :
>
> type foo_t
>
> val initial : foo_t
> val show : foo_t -> string
>
> And values can be referred with Foobar.foo, instead of Foobar.Foo.foo.
> Of course this is only useful if you don't want the user to see the
> internal module hierarchy, wich may not be what you had in mind.
Where do you put the foobar.ml? I've been trying it all over, I do not
see how you can flatten something that you pack.
Do you put foobar.ml at the same level of your directory foobar/, or in
you directory foobar/ ?
Or am I understanding you wrong?
All the best,
--
Guillaume Yziquel
http://yziquel.homelinux.org/