caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] strange compiler's tolerance
@ 2013-10-24 13:47 Matej Kosik
  2013-10-24 14:02 ` Pippijn van Steenhoven
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matej Kosik @ 2013-10-24 13:47 UTC (permalink / raw)
  To: caml-list

Hi,

Today I noticed a strange compiler's tolerance.
The compiler will not protest here:

   type foo = Bar | Baz

   ;;

   match Bar with
     | Bar _ -> ()
     | Baz -> ()

Why doesn't the compiler protest that I used wildcard after "Bar" constructor?
(It does protest if I put any other pattern except for the wildcard).

This slightly breaks the logic. Doesn't it?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-24 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-24 13:47 [Caml-list] strange compiler's tolerance 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 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).