Version française
Home     About     Download     Resources     Contact us    
Browse thread
Intended behavior of GenerateMap
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Thomas <david_hd@y...>
Subject: Re: [Caml-list] Anti-matching
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