From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamlbuild and automatic dependencies
Date: Sat, 17 Mar 2007 04:01:35 +0100 [thread overview]
Message-ID: <20070317030133.GB23992@yquem.inria.fr> (raw)
In-Reply-To: <1174090706.10421.29.camel@rosella.wigram>
Hi,
On Sat, Mar 17, 2007 at 11:18:26AM +1100, skaller wrote:
> So actually, this F is distinct from Foo, even though all the
> members are the same. In particular, if Foo has an abstract type t,
> is F.t the same type as Foo.t?
Yes. If you write "module F = Foo", you say : the interface and the
implementation of F are the same as the interface and the
implementation of Foo. Therefore F.t is the same type as Foo.t.
On the other hand, if you add a signature constraint, you can make
the types different :
module Foo = struct type t = A end
module F = (Foo : sig type t = A end)
let f (x : F.t) = (x : Foo.t)
^
This expression has type F.t but is here used with type Foo.t
--
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/
next prev parent reply other threads:[~2007-03-17 3:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-14 12:14 Joel Reymont
2007-03-14 12:24 ` [Caml-list] " Nicolas Pouillard
2007-03-14 12:36 ` Joel Reymont
2007-03-14 12:43 ` Nicolas Pouillard
2007-03-14 12:47 ` Joel Reymont
2007-03-14 13:11 ` Nicolas Pouillard
2007-03-14 20:11 ` skaller
2007-03-14 20:57 ` Alain Frisch
2007-03-15 3:46 ` skaller
2007-03-16 14:00 ` Joel Reymont
2007-03-16 14:22 ` Daniel de Rauglaudre
2007-03-17 0:18 ` skaller
2007-03-17 3:01 ` Daniel de Rauglaudre [this message]
2007-03-17 8:14 ` Alain Frisch
2007-03-17 13:52 ` Modules for Dummies skaller
2007-03-16 14:40 ` [Caml-list] ocamlbuild and automatic dependencies Jacques Garrigue
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=20070317030133.GB23992@yquem.inria.fr \
--to=daniel.de_rauglaudre@inria.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