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: Oleg Trott <oleg_trott@c...>
Subject: Re: [Caml-list] infinity matches all
On Monday 25 August 2003 10:12 am, Yaron Minsky wrote:
> 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.

This is ugly. The same happens with  `nan' , BTW.

-- 
Oleg Trott <oleg_trott@columbia.edu>

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