Browse thread
[Caml-list] Functorizing large collections of modules
[
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: | Sami Mäkelä <sajuma@u...> |
| Subject: | Re: [Caml-list] Functorizing large collections of modules |
"Yaron M. Minsky" wrote: > > > Conceptually what I want is a single structure like this: > > > > > > module Library(ZZp:ZZpSig) = > > > struct > > > > > > module Foo = > > > struct ... end > > > > > > module Bar = > > > struct ... end > > > > > > ... > > > > > > end what i have used is: foo.ml: module Library (ZZp:ZZpSig) = struct module Foo = struct ... end end bar.ml: module Library (ZZp:ZZpSig) = struct include Foo.Library (ZZp) module Bar = struct ... end end quux.ml: module Library (ZZp:ZZpSig) = struct include Bar.Library (ZZp) module Quux = struct ... end end etc. there are still few problems, but perhaps this is good enough > > > > > > That way, all the interior modules (Foo, Bar) get to reference the same > > > ZZp, without having to functorize the individual modules. So, what I'd > > > like is to be able to do this without sticking the modules Foo and Bar > > > into the same single large unmanageable file. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners