From: Markus Mottl <mottl@miss.wu-wien.ac.at>
To: filliatr@csl.sri.com
Cc: caml-list@inria.fr (OCAML)
Subject: Re: additions to standard library?
Date: Wed, 8 Mar 2000 23:29:30 +0100 (MET) [thread overview]
Message-ID: <200003082229.XAA14210@miss.wu-wien.ac.at> (raw)
In-Reply-To: <14534.41960.928650.590869@cylinder.csl.sri.com> from "Jean-Christophe Filliatre" at Mar 08, 2000 11:03:04 AM
> But when using functorial interfaces like Set.Make, you have to
> redefine these functions for each application of the functor. Thus,
> you really need these functions to be defined in the functor i.e.
> together with the datatype (and, by the way, you can then define these
> functions a bit more efficiently---without using exceptions).
Exactly - this raises another question which has been bothering me from
time to time when using the module system:
How can you extend the functionality of a module without having to "copy"
the definitions of the underlying module "by hand"? In a case which I found
particularly ugly (in the "res"-library), I had to "copy" nearly 100 lines
as in:
module Foo = struct
module B = ...
type t = B.t
...
let iter = B.iter
let iteri = B.iteri
let map = B.map
let mapi = B.mapi
...
end
Everytime the other module gets extended, I have to add code by hand here,
too, to make it available. I do not see any simple workaround for this.
Extending standard libraries with needed functionality would be much easier
if there were a convenient way to get around the problem above.
Regards,
Markus Mottl
--
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
next prev parent reply other threads:[~2000-03-10 8:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-07 15:24 Markus Mottl
2000-03-08 19:03 ` Jean-Christophe Filliatre
2000-03-08 22:29 ` Markus Mottl [this message]
2000-03-10 10:51 ` Christian RINDERKNECHT
2000-03-09 13:18 ` Thorsten Ohl
2000-03-10 10:04 ` Francisco Valverde Albacete
2000-03-10 20:33 ` Markus Mottl
2000-03-14 23:15 ` Max Skaller
2000-03-11 18:49 ` Brian Rogoff
2000-03-12 1:54 ` Jerome Vouillon
[not found] ` <200003120239.DAA18581@miss.wu-wien.ac.at>
2000-03-14 17:53 ` Pierre Weis
2000-03-10 17:55 Manuel Fahndrich
2000-03-14 17:24 Don Syme
2000-03-21 21:08 ` John Max Skaller
2000-03-21 21:43 Don Syme
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=200003082229.XAA14210@miss.wu-wien.ac.at \
--to=mottl@miss.wu-wien.ac.at \
--cc=caml-list@inria.fr \
--cc=filliatr@csl.sri.com \
/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