Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
recursion/iterator question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-04-20 (11:53)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] recursion/iterator question

On 2006-04-17, at 11:36, Christian Stork wrote:

> Question to the rest of the list:  The ocaml compiler complains with
>   ...
>   Warning P: this pattern-matching is not exhaustive.
>   Here is an example of a value that is not matched:
>   (1, [])
>   (However, some guarded clause may match this value.)
>   ...
> Am I right to assume there's no way to get rid of this warning  
> short of
> disabling P-warnings on the command line?  (I can't list all the  
> lacking
> patterns since they depend on n, right?)

Since nobody has pointed out the obvious, I'll do it:

You can always disable this warning for a particular pattern-matching
by adding the following as the last clause:

     | _ -> assert false

-- Damien