Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] syntax question -- end of pattern-matching
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] syntax question -- end of pattern-matching
Hi,

On Thu, Jul 18, 2002 at 03:27:16PM -0400, John Carr wrote:

> 	let f x = try x + 1 with Invalid_argument _ -> 42 ; ; "hello"
> is parsed as
> 	let f x = (try x + 1 with Invalid_argument _ -> 42;) ; "hello"

IMHO, this behaviour has not been planed: the yacc version (OCamlyacc)
seems to work like that, but the Camlp4 version (camlp4o) interprets
it the other way (as if there were only one semicolon).

I think that you should not use this feature and rather use parentheses
or the begin..end construction.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners