caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Lukasz Stafiniak <lukstafi@gmail.com>
To: Jacques Carette <carette@mcmaster.ca>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Why is this allowed?
Date: Mon, 31 May 2010 17:06:30 +0200	[thread overview]
Message-ID: <AANLkTilj8FHBNyV6dkyRakvhXR_IqLBZOPXbE946CtvK@mail.gmail.com> (raw)
In-Reply-To: <4C03CBD3.3010606@mcmaster.ca>

But what when someone includes or opens a module with Foo after "type
foo = Foo"? What when someone opens it locally in an expression?

Does a variant value have a unique type with a unique path so that it
would be possible to guarantee that within this unique path there are
no type *definitions* that override a variant name?

On Mon, May 31, 2010 at 4:46 PM, Jacques Carette <carette@mcmaster.ca> wrote:
> type foo = Foo
> let x = Foo
>
> type foo2 = Foo | Bar
> let y = Foo
> let z = (x,y) ;;
>
> I thought that re-using of algebraic labels was not allowed - but apparently
> it is?


  reply	other threads:[~2010-05-31 15:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31 14:46 Jacques Carette
2010-05-31 15:06 ` Lukasz Stafiniak [this message]
2010-05-31 15:48   ` [Caml-list] " Jacques Carette
2010-05-31 15:43 ` Till Varoquaux
2010-05-31 15:54   ` Jacques Carette
2010-06-09 15:11     ` Goswin von Brederlow
2010-06-09 15:17       ` bluestorm
2010-06-09 15:31         ` Jacques Carette

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=AANLkTilj8FHBNyV6dkyRakvhXR_IqLBZOPXbE946CtvK@mail.gmail.com \
    --to=lukstafi@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=carette@mcmaster.ca \
    /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;
as well as URLs for NNTP newsgroup(s).