From: Ivan <ivg@ieee.org>
To: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: [Caml-list] parametric modules file layout
Date: Wed, 18 Jul 2012 11:16:09 +0400 [thread overview]
Message-ID: <355181342595769@web13h.yandex.ru> (raw)
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.
next reply other threads:[~2012-07-18 7:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 7:16 Ivan [this message]
2012-07-18 8:19 ` Romain Bardou
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=355181342595769@web13h.yandex.ru \
--to=ivg@ieee.org \
--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;
as well as URLs for NNTP newsgroup(s).