Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* partial match in let
@ 2004-11-29 17:10 Christophe Raffalli
  2004-11-29 18:40 ` [Caml-list] " Dan Grossman
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Christophe Raffalli @ 2004-11-29 17:10 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]


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
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
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 www.keyserver.net
---------------------------------------------

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-30 14:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 17:10 partial match in let Christophe Raffalli
2004-11-29 18:40 ` [Caml-list] " Dan Grossman
2004-11-29 18:45   ` Dan Grossman
2004-11-29 18:42 ` Dan Grossman
2004-11-29 19:02 ` Robert W.
2004-11-30 14:05 ` Luc Maranget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox