caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jonathan Roewen" <jonathan.roewen@gmail.com>
To: "Arne Ehrlich" <arne.ehrlich@groknet.de>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] is this a bug ?
Date: Wed, 10 May 2006 06:24:53 +1200	[thread overview]
Message-ID: <ad8cfe7e0605091124l23ff27d7yf9f2f309b244d039@mail.gmail.com> (raw)
In-Reply-To: <200605091547.47017.arne.ehrlich@groknet.de>

> You found an semantic problem in the gramar ^^
> or-patterns do not play well with "when"
>
> I think it's a bug in the semantics...

I don't believe so. It depends on the type. In fact, it works very
well with sum types (I did a very small inference engine which used or
patterns with when to great effect).

The problem is the two match clauses are not different. They look
different for the fact that the variables are bound in a different
order -- which is why the warning occurs. For matching, variable
naming has no semantic impact, hence the confusion.

Jonathan


  reply	other threads:[~2006-05-09 18:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-09 13:09 Christophe Raffalli
2006-05-09 13:16 ` [Caml-list] " Remi Vanicat
2006-05-09 13:19 ` Samuel Mimram
2006-05-09 13:26   ` Christophe Raffalli
2006-05-09 13:33     ` Samuel Mimram
2006-05-09 13:30   ` Yoann Padioleau
2006-05-09 13:22 ` Christophe Raffalli
2006-05-09 13:33 ` Luc Maranget
2006-05-09 13:47 ` Arne Ehrlich
2006-05-09 18:24   ` Jonathan Roewen [this message]
2006-05-09 13:47 ` Alain Frisch
  -- strict thread matches above, loose matches on Subject: below --
2007-05-01 12:59 Is this a bug? Thomas Fischbacher
2007-05-01 13:34 ` [Caml-list] " Eric Cooper
2007-05-02  0:25 ` Jacques Garrigue
2007-05-02  0:50   ` Thomas Fischbacher
2007-05-02  2:40     ` Jacques GARRIGUE
2002-07-08 19:53 [Caml-list] productivity improvement Oleg
2002-07-10 15:39 ` John Max Skaller
2002-07-12 12:16   ` [Caml-list] Is this a bug? John Max Skaller
2002-07-12 14:05     ` Xavier Leroy

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=ad8cfe7e0605091124l23ff27d7yf9f2f309b244d039@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=arne.ehrlich@groknet.de \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).