Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Sami Mäkelä" <sajuma@utu.fi>
To: "Yaron M. Minsky" <yminsky@cs.cornell.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Functorizing large collections of modules
Date: Mon, 18 Mar 2002 14:52:34 +0200	[thread overview]
Message-ID: <3C95E312.28961EEF@utu.fi> (raw)
In-Reply-To: <1016453982.27588.53.camel@dragonfly.localdomain>

"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


  reply	other threads:[~2002-03-18 12:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-18  4:09 Yaron M. Minsky
2002-03-18  9:01 ` Remi VANICAT
2002-03-18 12:19   ` Yaron M. Minsky
2002-03-18 12:52     ` Sami Mäkelä [this message]
2002-03-19 23:27       ` Yaron M. Minsky
2002-03-19 23:44         ` Fermin Reig
2002-03-20  9:09         ` Francois Pottier
2002-03-20 11:24           ` Alain Frisch
2002-03-20 12:59             ` Yaron M. Minsky

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=3C95E312.28961EEF@utu.fi \
    --to=sajuma@utu.fi \
    --cc=caml-list@inria.fr \
    --cc=yminsky@cs.cornell.edu \
    /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