<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/94583a7daf36f42374916a15a02f4ce3"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-07-19T08:33:14"
  subject="Re: [Caml-list] syntax question -- end of pattern-matching"
  prev="2002/07/cdd23bf04bb19a6191ed787cbb39b10b"
  next="2002/07/ab4601e4eb8d239bf25b5a1757596831"
  prev-in-thread="2002/07/444e872df95c217576d95f578cc60764"
  next-in-thread="2002/07/4e344307419808f13975d9232ec23d56"
  prev-thread="2002/07/16bf0e05b121ad70d4407203ffcc2060"
  next-thread="2002/07/c22d9fd21bcea5691f5678e925df1862"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] syntax question -- end of pattern-matching">
<msg 
  url="2002/07/444e872df95c217576d95f578cc60764"
  from="John Carr &lt;jfc@M...&gt;"
  author="John Carr"
  date="2002-07-18T19:27:21"
  subject="[Caml-list] syntax question -- end of pattern-matching">
<msg 
  url="2002/07/94583a7daf36f42374916a15a02f4ce3"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-07-19T08:33:14"
  subject="Re: [Caml-list] syntax question -- end of pattern-matching">
</msg>
<msg 
  url="2002/07/4e344307419808f13975d9232ec23d56"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-19T12:00:30"
  subject="Re: [Caml-list] syntax question -- end of pattern-matching">
</msg>
</msg>
</thread>

<contents>
Hi,

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

&gt; 	let f x = try x + 1 with Invalid_argument _ -&gt; 42 ; ; "hello"
&gt; is parsed as
&gt; 	let f x = (try x + 1 with Invalid_argument _ -&gt; 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

</contents>

</message>

