From: Brian Hurt <bhurt@spnz.org>
To: caml-list <caml-list@inria.fr>
Subject: Stupid question re:modules
Date: Thu, 23 Aug 2007 20:32:22 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0708232023160.12703@localhost> (raw)
I should just know this. So let's say I have two module types defined:
module type Foo = sig
type 'a t
val foo : 'a -> 'a t
end;;
module type Bar = sig
type 'a t
val bar : 'a -> 'a t
end;;
Now, I want to define a module that is both a Foo and a Bar without
cutting and pasting the module definitions around. I've been trying to
do:
module Baz : sig
type 'a baz
include Foo with type 'a t = 'a baz
include Bar with type 'a t = 'a baz
end;;
but this blows up on the Bar line (multiple definitions of 'a t).
There is a solution to this, I'm just being stupid and forgetting what it
is. Hints would be appreciated.
Brian
next reply other threads:[~2007-08-24 0:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-24 0:32 Brian Hurt [this message]
2007-08-24 2:56 ` [Caml-list] " Jacques Garrigue
2007-08-24 4:31 ` Julien Moutinho
2007-08-24 10:16 ` Vincent Aravantinos
2007-09-23 9:37 ` David Teller
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=Pine.LNX.4.64.0708232023160.12703@localhost \
--to=bhurt@spnz.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