Browse thread
partial match in let
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-11-29 (18:42) |
From: | Dan Grossman <djg@c...> |
Subject: | Re: [Caml-list] partial match in let |
let (x,y) = (match f(x) with [x1;y1] -> (x,y) | _ -> assert false) in foo Christophe Raffalli wrote: > > 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) >