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
partial match in let
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <Christophe.Raffalli@u...>
Subject: partial match in let

Wish: I had like a way to avoid the partial match warning in code like

let [x;y] = f (x) in foo

Because if foo is long writing

match f(x) with [x;y] -> foo | _ -> assert false

is really ennoying, especially if you have a long sequence of let.

I find usefull the partial match warning for match and function but not 
for let (if you write a let, I think you are aware that your matching 
will be partial for any data type with more than one constructor, you do 
not need a warning)

Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on