English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Request for complete pattern matching
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-22 (22:43)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: Request for complete pattern matching

- Lazy constructor and function can not be matched ... and this is ennoying

I saw a post recently about lazy constructor and I can not write the
camlp4 extension I want because of the second limitation ...

It may be not clear what I mean by matching a function (looks impossible
;-). I mean something like

pattern <= expr expr expr       is a pattern

and a function f is matched by

p <= e1 ... eN      iff     f e1 ... eN is matched by p

(I do not care about the final syntax ...)

I know there is a BIG problem of ambiguity in the evaluation order for
complex pattern matching ...
The user should be warned about that. But this would not be a problem
for the application I have in mind.

Christophe Raffalli