From: "andrew cooke" <andrew@acooke.org>
To: "ocaml list" <caml-list@inria.fr>
Subject: [Caml-list] Newbie: Separate compilation of interfaces, modules
Date: Sat, 28 Feb 2004 09:30:52 -0300 (CLST) [thread overview]
Message-ID: <56125.139.229.3.218.1077971452.squirrel@localhost> (raw)
Hi,
I can't work out how to structure the following in files (there are
examples in the documentation, but all seem to be for interactive work).
I don't know if the problem is conceptual (not understanding modules,
signatures etc) or practical (don't know what to type).
I have an interface, PersistentArray, that I define in PersistentArray.mli
Then I have an implementation, BinaryTreeArray, that I code in BinaryTree.ml
But where do I put the information that BinaryTreeArray implements
PersistentArray? What should go in BinaryTreeArray.mli so that I can use
it as a particular implementation of PersistentArray?
The idea is that later I can define some other implementation, say
TrieArray, that can be used as the PersistentArray implementation without
changing any more code than is necessary (preferably just one line
somewhere).
Thanks,
Andrew
--
__ _ __ ___ ___| |_____ work web site: http://www.ctio.noao.edu/~andrew
/ _` / _/ _ \/ _ \ / / -_) personal web site: http://www.acooke.org/andrew
\__,_\__\___/\___/_\_\___| personal gallery: http://www.acooke.org/pancito
-------------------
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
next reply other threads:[~2004-02-28 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 12:30 andrew cooke [this message]
2004-02-28 13:04 ` To beginners list " andrew cooke
2004-03-02 9:30 ` Jean-Christophe Filliatre
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=56125.139.229.3.218.1077971452.squirrel@localhost \
--to=andrew@acooke.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