From: Romain Bardou <bardou@lsv.ens-cachan.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] parametric modules file layout
Date: Wed, 18 Jul 2012 10:19:57 +0200 [thread overview]
Message-ID: <500671AD.5050305@lsv.ens-cachan.fr> (raw)
In-Reply-To: <355181342595769@web13h.yandex.ru>
On 18/07/2012 09:16, Ivan wrote:
>
> Hello!
>
> I'm creating a functor named Forest that is parametrized by two modules: A - defines operations on assoc pair, and H - defines operations on hierarchical types. So I have three signatures : ASSOC, HIER, FOREST and one module Make. Each signature is rather large and needs to be defined both in mli and ml.
>
> I know, that with types the problem of code repetition can be solved by refactoring them in a separate module (a ml file with implicit mli). Is it a valid solution for signatures? Can I put a signature in the sig.ml file and then refer to it with ``Sig.ASSOC?'' Or maybe there're other solutions or common practices to solve such problems?
>
>
> Thanks, in advance.
>
I don't think there is any problem with that solution. It's what I would do.
Cheers,
--
Romain
next prev parent reply other threads:[~2012-07-18 8:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 7:16 Ivan
2012-07-18 8:19 ` Romain Bardou [this message]
2012-07-18 14:16 ` Dan Bensen
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=500671AD.5050305@lsv.ens-cachan.fr \
--to=bardou@lsv.ens-cachan.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