Version franaise
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: Frédéric Gava <gava@u...>
Subject: Anti-matching
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