caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Matching when
@ 2002-08-05  9:26 Nicolas Cannasse
  2002-08-05  9:41 ` Luc Maranget
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Nicolas Cannasse @ 2002-08-05  9:26 UTC (permalink / raw)
  To: OCaml

Hi !

I was thinking that the following should be possible :

match e with
| Any
| Int x when x > 0 ->
        .... (* here we don't use x *)
| ....

But the typechecker reject it because of the unbound 'x' in the "Any"
matching.
I don't know what kind of difficulty this modification require, but it would
be nice if the compiler was able to resolve such cases.

:-)
Nicolas Cannasse

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2002-08-07 11:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-05  9:26 [Caml-list] Matching when Nicolas Cannasse
2002-08-05  9:41 ` Luc Maranget
2002-08-05 16:13   ` John Max Skaller
2002-08-05 19:29     ` Luc Maranget
2002-08-05 20:16       ` [Caml-list] Sharing Files between OCaml and C Michael Tucker
2002-08-06 13:04         ` Olivier Andrieu
2002-08-06 14:01           ` Bruno.Verlyck
2002-08-06 18:50             ` Lex Stein
2002-08-07 11:40               ` Bruno.Verlyck
2002-08-05 13:05 ` [Caml-list] Matching when Pierre Weis
2002-08-05 15:50 ` John Max Skaller
2002-08-05 16:02 ` Remi VANICAT
2002-08-05 16:23   ` John Max Skaller
2002-08-05 18:25 ` Oleg
2002-08-06  6:37   ` Florian Hars

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).