Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Pattern matcher no more supposed to warn on non exhaustive patterns ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Luc Maranget <luc.maranget@i...>
Subject: Re: [Caml-list] Pattern matcher no more supposed to warn on non exhaustive patterns ?
Hum I wrote too fast...


>>>>   1. Provably unused guarded clauses are not detected.
This is not excatly true, some are detected.



> match x with
> | Some _ -> "not even (I mean odd)"
> | Some x when x mod 2 = 0 -> "even" 
> | None -> "nothing"
> 

There is a warning for the unused clause number 2.

--Luc

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr