From: David Thomas <david_hd@yahoo.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Anti-matching
Date: Sun, 24 Jun 2007 03:52:38 -0700 (PDT) [thread overview]
Message-ID: <20070624105238.82437.qmail@web30511.mail.mud.yahoo.com> (raw)
In-Reply-To: <467E45AB.4070707@univ-paris12.fr>
Isn't "!(x) -> a | _ -> b" the same as "x -> b | _ ->
a"? I don't really see much of a benefit, at the cost
(I assume) of complexity.
--- Frédéric Gava <gava@univ-paris12.fr> wrote:
> Dear Caml-list
>
> I have read the following feature of TOM,
> anti-matching:
>
http://tom.loria.fr/soft/release-2.4/manual-2.4/manual003.html#toc8
>
>
> that allow to specify what you don't want to match.
> For example in a
> OCaml like syntax (for the type 'a option = None |
> Some of 'a):
>
> (function !(Some _) -> assert false)
>
> would raise an exception in case of None. Ok, this
> is not a really
> interesting example but is it a good feature for
> ocaml ? Is some one
> have do a camlp4 extension for this ? I do not find
> any library for this
> in the the ocaml's hump...
>
> Best,
> Frédéric Gava
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
>
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list:
> http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
next prev parent reply other threads:[~2007-06-24 10:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-08 8:36 Intended behavior of GenerateMap Christian Stork
2007-06-13 11:36 ` [Caml-list] " Nicolas Pouillard
2007-06-14 12:35 ` Nicolas Pouillard
2007-06-23 18:59 ` Nicolas Pouillard
2007-06-23 21:04 ` Christian Stork
2007-06-24 8:13 ` Nicolas Pouillard
2007-06-24 10:21 ` Anti-matching Frédéric Gava
2007-06-24 10:52 ` David Thomas [this message]
2007-06-24 12:32 ` [Caml-list] Anti-matching Frédéric Gava
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=20070624105238.82437.qmail@web30511.mail.mud.yahoo.com \
--to=david_hd@yahoo.com \
--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