Version franaise
Home About Download Resources Contact us

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2007-06-24 (10:21)
From: Frédéric Gava <gava@u...>
Subject: Anti-matching
Dear Caml-list

I have read the following feature of TOM, anti-matching:

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

Frédéric Gava