From: Vincent Aravantinos <vincent.aravantinos@yahoo.fr>
To: "Hyeonseung Im" <genilhs@postech.ac.kr>
Cc: <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] A signature that cannot be inhabited by any structures
Date: Sat, 8 Sep 2007 13:39:04 +0200 [thread overview]
Message-ID: <47BC498C-B6EA-443E-B990-991973A53179@yahoo.fr> (raw)
In-Reply-To: <002d01c7f1ed$77f31130$67d93390$@ac.kr>
Le 8 sept. 07 à 09:54, Hyeonseung Im a écrit :
> Hi all.
>
>
>
> I found something interesting. In the OCaml, the following
> signature is valid. (I tested it with the OCaml version 3.09.2 and
> 3.10.0.)
>
>
>
> (In the top-level)
>
> # module type S = sig val x : int val x : float end;;
>
> module type S = sig val x : int val x : float end
>
>
>
> But, this module type seems not to be inhabited by any structures.
> On the contrary, in the SML this sort of module types cannot be
> defined. (Actually, it raises an error: the duplication of variables.)
>
>
>
> I wonder if this is a feature of the OCaml (or maybe a bug in the
> implementation).
>
> I’d appreciate any comment on it.
>
>
>
> Hyeonseung Im.
>
Hi,
apart from the question "is this a bug or a feature ?", I'd like to
say this is quite useful when you want to do some kind of inheritance
between modules.
See http://caml.inria.fr/pub/ml-archives/caml-list/
2007/08/8f1e17b89b64d66ae406521947709aff.en.html for the different
situation for type replication.
Vincent
prev parent reply other threads:[~2007-09-08 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-08 7:54 Hyeonseung Im
2007-09-08 11:39 ` Vincent Aravantinos [this message]
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=47BC498C-B6EA-443E-B990-991973A53179@yahoo.fr \
--to=vincent.aravantinos@yahoo.fr \
--cc=caml-list@yquem.inria.fr \
--cc=genilhs@postech.ac.kr \
/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