caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Warning 28.
@ 2013-06-05  5:26 Ivan Gotovchits
  2013-06-05  6:54 ` Virgile Prevosto
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Gotovchits @ 2013-06-05  5:26 UTC (permalink / raw)
  To: caml-list


After switching to a newer version of Ocaml I've started to receive
some interesting warnings on my old codebase. And there is one warning
that I do not understand. I have the following patter matching:

    ...
    | Ref n -> ...
    ...

where Ref is:

type t =
  ...
  | Ref of int

Compiler issues me a warning:

«Warning 28: wildcard pattern given as argument to a constant constructor»

Sorry, but if I understand this wording correctly, then I do not see
anything criminal in issuing a wildcard pattern to a constant
constructor. What is wrong?
-- 
         (__) 
         (oo) 
   /------\/ 
  / |    ||   
 *  /\---/\ 
    ~~   ~~   
...."Have you mooed today?"...

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

end of thread, other threads:[~2013-06-05  7:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-05  5:26 [Caml-list] Warning 28 Ivan Gotovchits
2013-06-05  6:54 ` Virgile Prevosto
2013-06-05  7:04   ` Ivan Gotovchits
2013-06-05  7:22     ` Alain Frisch

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).