Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: taras <taras.judge@shaw.ca>
To: caml-list@inria.fr
Subject: Pattern matching fallthrough with guards
Date: Tue, 28 Nov 2006 11:01:08 -0800	[thread overview]
Message-ID: <456C8774.4040009@shaw.ca> (raw)

Hi,
I noticed that one can coalesce multiple patterns like

function Some _
     | None -> 0

However when I add guards to this hypothetical example, I get a syntax error

function Some _ when 1 = 2
    |  None -> 0

I'm wondering if this inconsistency is considered to be a bug or not?

Taras


             reply	other threads:[~2006-11-28 19:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28 19:01 taras [this message]
2006-11-28 19:53 ` [Caml-list] " Martin Jambon

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=456C8774.4040009@shaw.ca \
    --to=taras.judge@shaw.ca \
    --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