<?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="2009/10/aba0d7c29944654db93a75ba9f263e53"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2009-10-06T13:15:08"
  subject="Re: [Caml-list] Constructors are not functions"
  prev="2009/10/313b39775708cfcfea942296fb5480ba"
  next="2009/10/8f4a51ef46e423a76ca1a9b355516591"
  prev-in-thread="2009/10/3e23a32f43714fe2aaa93dba667b511f"
  next-in-thread="2009/10/fe2ab6fd1ea44b59605e06017966efe8"
  prev-thread="2009/10/c0015c890b908f272c4dc603b1de268a"
  next-thread="2009/10/f4c2db533557676eb31a47d6e4761518"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Constructors are not functions">
<msg 
  url="2009/10/c52bdaf88a932ffd02a17cf12e7a6843"
  from="Chantal KELLER &lt;chantal.keller@w...&gt;"
  author="Chantal KELLER"
  date="2009-10-06T12:01:35"
  subject="Constructors are not functions">
<msg 
  url="2009/10/198f097943e995b4154915c479f6241d"
  from="Philippe Wang &lt;philippe.wang.lists@g...&gt;"
  author="Philippe Wang"
  date="2009-10-06T12:19:59"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/3d94477a1248c4ea3e9b3796fbd96b30"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2009-10-06T12:37:38"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/8f4a51ef46e423a76ca1a9b355516591"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-10-06T13:39:01"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
<msg 
  url="2009/10/e8e36f42040a988ae01a1722a9058a0c"
  from="blue storm &lt;bluestorm.dylc@g...&gt;"
  author="blue storm"
  date="2009-10-10T11:49:25"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
</msg>
<msg 
  url="2009/10/0943a75983cb128775e51daec525fc91"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-06T12:45:10"
  subject="RE: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/9786fb19966b2a45500aaecdb3f831a9"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-06T12:46:57"
  subject="RE: [Caml-list] Constructors are not functions">
</msg>
<msg 
  url="2009/10/313b39775708cfcfea942296fb5480ba"
  from="Jim Farrand &lt;jim.farrand@g...&gt;"
  author="Jim Farrand"
  date="2009-10-06T13:14:37"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/3e23a32f43714fe2aaa93dba667b511f"
  from="Michel Mauny &lt;Michel.Mauny@i...&gt;"
  author="Michel Mauny"
  date="2009-10-06T13:50:29"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
<msg 
  url="2009/10/aba0d7c29944654db93a75ba9f263e53"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2009-10-06T13:15:08"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/fe2ab6fd1ea44b59605e06017966efe8"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-06T14:04:08"
  subject="RE: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/7ba4d13d6fa24170cbd8758b6cd063b3"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2009-10-06T14:50:46"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
<msg 
  url="2009/10/ccb202ae118dbc3a11bb5a89174e5551"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-10-06T15:24:10"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/b12df86f3d2ae39913e2e3a9d6a2afd5"
  from="Jacques Garrigue &lt;garrigue@m...&gt;"
  author="Jacques Garrigue"
  date="2009-10-06T16:31:44"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
<msg 
  url="2009/10/f264a933b70853017a592acf45adc39f"
  from="Goswin von Brederlow &lt;goswin-v-b@w...&gt;"
  author="Goswin von Brederlow"
  date="2009-10-08T12:42:14"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/2f4e4d057ce5bb361d58ef7ac98d95e5"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-09T06:29:55"
  subject="RE: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/e7f2f5d4e0ff800e2527d4e93fdbed96"
  from="Goswin von Brederlow &lt;goswin-v-b@w...&gt;"
  author="Goswin von Brederlow"
  date="2009-10-10T06:25:27"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2009/10/94e682caf3469295724fbd74aa679dbb"
  from="Gerd Stolpmann &lt;gerd@g...&gt;"
  author="Gerd Stolpmann"
  date="2009-10-06T13:13:51"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
<msg 
  url="2009/10/eef410c2123f8a267621dfdc8c2c22da"
  from="Jérémie Dimino &lt;jeremie@d...&gt;"
  author="Jérémie Dimino"
  date="2009-10-06T15:51:01"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/9b4d5d1a9bf77b85b658129d148e5d03"
  from="blue storm &lt;bluestorm.dylc@g...&gt;"
  author="blue storm"
  date="2009-10-06T21:55:17"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
</msg>
</thread>

<contents>
On Tuesday 06 October 2009 13:45:04 David Allsopp wrote:
&gt; &gt;   Is there a reason for constructors not to behave like functions? For
&gt; &gt; instance, one cannot make a partial application from a constructor:
&gt;
&gt; This is how SML handles constructors, Xavier explained the reasons he chose
&gt; to depart from this in:
&gt;
&gt; http://caml.inria.fr/pub/ml-archives/caml-list/2001/08/47db53a4b42529708647
&gt;c9e81183598b.en.html
&gt;
&gt; I think it would be possible to simulate the SML behaviour in OCaml using
&gt; camlp4 (if you assume that for [type foo = Bar of int] that future unbound
&gt; references to [bar] are interpreted as [fun x -&gt; bar x] instead of an
&gt; error)

Only if you turned multi-argument type constructors into single-argument ones 
taking a tuple, i.e. type definitions like:

  type t = Bar of int * int

must become:

  type t = Bar of (int * int)

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e

</contents>

</message>

