Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] infinity matches all
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yaron Minsky <yminsky@c...>
Subject: [Caml-list] infinity matches all
Can anyone explain the following behavior of match when used with infinity?

# match "foo" with infinity -> "bar";;
- : string = "bar"

This shouldn't even typecheck.  It seems to treat infinity as equivalent
to "_".  This behavior comes up in version 3.06.

Yaron


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