Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Virgile Prevosto <virgile.prevosto@m4x.org>
To: OCAML <caml-list@inria.fr>
Subject: Re: [Caml-list] strange compiler's tolerance
Date: Thu, 24 Oct 2013 16:35:09 +0200	[thread overview]
Message-ID: <CA+yPOVhTM7NW6Yrz_wPL3ciRoivy_sDrMjgaKiExqSoX8c5UNg@mail.gmail.com> (raw)
In-Reply-To: <52692507.7040202@gmail.com>

Hello,

2013/10/24 Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com>:
> Hi,
>
> Today I noticed a strange compiler's tolerance.
> The compiler will not protest here:
>
>   type foo = Bar | Baz
>
>   ;;
>
>   match Bar with
>     | Bar _ -> ()
>     | Baz -> ()
>

It's not a bug, it's a "dubious feature". See
http://caml.inria.fr/mantis/view.php?id=5502 for more information. If
like me you indeed find that's it's more dubious than a feature,
warning 28
"Wildcard pattern given as argument to a constant constructor" is your
friend and is set by default.

Best regards,
-- 
E tutto per oggi, a la prossima volta
Virgile

      parent reply	other threads:[~2013-10-24 14:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24 13:47 Matej Kosik
2013-10-24 14:02 ` Pippijn van Steenhoven
2013-10-24 14:05 ` Gabriel Scherer
2013-10-24 14:35 ` Virgile Prevosto [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=CA+yPOVhTM7NW6Yrz_wPL3ciRoivy_sDrMjgaKiExqSoX8c5UNg@mail.gmail.com \
    --to=virgile.prevosto@m4x.org \
    --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