<?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="2006/02/8f36066258b5713fbc5692a41cc44caa"
  from="Eric Cooper &lt;ecc@c...&gt;"
  author="Eric Cooper"
  date="2006-02-01T16:37:16"
  subject="Re: [Caml-list] Private exceptions"
  prev="2006/02/25b7b0f2de75940861aedc9ffed51d77"
  next="2006/02/d9507ec1090876a39668d43221abea7c"
  prev-in-thread="2006/01/30ab3d192830354e683beb041cafa8a8"
  next-in-thread="2006/02/d9507ec1090876a39668d43221abea7c"
  prev-thread="2006/01/e72c6ac936bb324a598c602c493d3cb2"
  next-thread="2006/01/c4e12277980ed00fce5c5d5756d03c97"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Private exceptions">
<msg 
  url="2006/01/30ab3d192830354e683beb041cafa8a8"
  from="Alessandro Baretta &lt;a.baretta@b...&gt;"
  author="Alessandro Baretta"
  date="2006-01-30T14:32:02"
  subject="Private exceptions">
<msg 
  url="2006/02/8f36066258b5713fbc5692a41cc44caa"
  from="Eric Cooper &lt;ecc@c...&gt;"
  author="Eric Cooper"
  date="2006-02-01T16:37:16"
  subject="Re: [Caml-list] Private exceptions">
<msg 
  url="2006/02/d9507ec1090876a39668d43221abea7c"
  from="Alessandro Baretta &lt;a.baretta@b...&gt;"
  author="Alessandro Baretta"
  date="2006-02-01T17:30:37"
  subject="Re: [Caml-list] Private exceptions">
</msg>
</msg>
</msg>
</thread>

<contents>
On Mon, Jan 30, 2006 at 03:31:56PM +0100, Alessandro Baretta wrote:
&gt; [...]
&gt; In this situation, I'd like to be able to declare an exception "private" to 
&gt; a module, such that that exception can only be matched within the scope of 
&gt; the exception declaration. I am currently sidestepping the problem by using 
&gt; an exception which is not exported by the defining module, and consequently 
&gt; cannot be matched explicitly, but it can be matched by a try &lt;expr&gt; with _ 
&gt; -&gt; &lt;whatever&gt;.

But the ability to match any exception (and re-raise it, without
knowing anything more about it) is essential for implementing
constructs like "unwind-protect", "with-open-file", suspend/force,
etc.

-- 
Eric Cooper             e c c @ c m u . e d u

</contents>

</message>

