<?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/75d4aecf09efc05caede6b7c53c1292f"
  from="Francois Pottier &lt;francois.pottier@i...&gt;"
  author="Francois Pottier"
  date="2002-07-03T07:51:33"
  subject="Re: [Caml-list] simple typing question"
  prev="2002/07/729263137a5c609a8795ff7b62ccf4d0"
  next="2002/07/8aaf29027d45ab74beaf633b7b6c51b7"
  prev-in-thread="2002/07/371811a059d4c9d0b4de447e979f5e7b"
  next-in-thread="2002/07/edca71d918b76a8f602f512abd5e99ee"
  prev-thread="2002/07/6a74d59d6c9f1e932135281d10cf8619"
  next-thread="2002/07/562bfd7c9196fc3abcb454d8d4965868"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] simple typing question">
<msg 
  url="2002/07/1c3e421998b8c597856d6c991ff07910"
  from="Michael Vanier &lt;mvanier@c...&gt;"
  author="Michael Vanier"
  date="2002-07-02T08:49:58"
  subject="[Caml-list] simple typing question">
<msg 
  url="2002/07/3548469fc917388fb577cdf8c057664a"
  from="Pierre Weis &lt;pierre.weis@i...&gt;"
  author="Pierre Weis"
  date="2002-07-02T09:15:02"
  subject="Re: [Caml-list] simple typing question">
<msg 
  url="2002/07/21b0e21b4ac0db4ec833fe28522ef6f2"
  from="Michael Vanier &lt;mvanier@c...&gt;"
  author="Michael Vanier"
  date="2002-07-02T11:15:35"
  subject="Re: [Caml-list] simple typing question">
<msg 
  url="2002/07/13283d87244d3adbaa5e21df29c68d64"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-07-02T11:29:42"
  subject="Re: [Caml-list] simple typing question">
</msg>
<msg 
  url="2002/07/88db8213d1620c598904d4013899a04c"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-02T11:42:30"
  subject="Re: [Caml-list] simple typing question">
<msg 
  url="2002/07/1d39e152576c2aabdc0ee99c33754e7a"
  from="Pixel &lt;pixel@m...&gt;"
  author="Pixel"
  date="2002-07-02T18:58:20"
  subject="Re: [Caml-list] simple typing question">
<msg 
  url="2002/07/123444c4a1c6ba44fab849393fa7d36a"
  from="Pierre Weis &lt;pierre.weis@i...&gt;"
  author="Pierre Weis"
  date="2002-07-02T20:59:26"
  subject="Re: [Caml-list] simple typing question">
<msg 
  url="2002/07/26a23ba53cb0bf9c78b38c87c89f50a7"
  from="Pixel &lt;pixel@m...&gt;"
  author="Pixel"
  date="2002-07-03T00:39:46"
  subject="Re: [Caml-list] simple typing question">
<msg 
  url="2002/07/dc5aba42df0bce5e2da1527c3201263e"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2002-07-03T01:50:55"
  subject="Re: [Caml-list] simple typing question">
<msg 
  url="2002/07/371811a059d4c9d0b4de447e979f5e7b"
  from="Pixel &lt;pixel@m...&gt;"
  author="Pixel"
  date="2002-07-03T23:25:20"
  subject="Re: [Caml-list] simple typing question">
</msg>
</msg>
<msg 
  url="2002/07/75d4aecf09efc05caede6b7c53c1292f"
  from="Francois Pottier &lt;francois.pottier@i...&gt;"
  author="Francois Pottier"
  date="2002-07-03T07:51:33"
  subject="Re: [Caml-list] simple typing question">
<msg 
  url="2002/07/edca71d918b76a8f602f512abd5e99ee"
  from="Pixel &lt;pixel@m...&gt;"
  author="Pixel"
  date="2002-07-03T11:26:42"
  subject="Re: [Caml-list] simple typing question">
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2002/07/6af4fa15d93ed642e822426130a5b6d3"
  from="Lauri Alanko &lt;la@i...&gt;"
  author="Lauri Alanko"
  date="2002-07-04T14:55:06"
  subject="Re: [Caml-list] simple typing question">
</msg>
</msg>
<msg 
  url="2002/07/aec9d45534764d309bdb86d17d40cd38"
  from="Pierre Weis &lt;pierre.weis@i...&gt;"
  author="Pierre Weis"
  date="2002-07-02T14:56:26"
  subject="Re: [Caml-list] simple typing question">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>

On Wed, Jul 03, 2002 at 02:39:02AM +0200, Pixel wrote:
&gt; 
&gt; based on the number of parameters of functions (given by the type).

There is no such thing as the `number of parameters of a function'
in ML. Consider the following example:
  
  # let apply f x = f x;;
  val apply : ('a -&gt; 'b) -&gt; 'a -&gt; 'b = &lt;fun&gt;
  # apply (fun x -&gt; x) 1;;
  - : int = 1
  # apply (fun x y -&gt; x + y) 1 2;;
  - : int = 3

... and so on. You can write applications of `apply' with any
numbers of arguments. Its type doesn't help, because it ends
with a quantified type variable 'b, which can be instantiated
with an arrow type of arbitrary length.

Besides, your restriction amounts to preventing functions from returning
functions, which doesn't make much sense in a functional language, in my
opinion. Jacques has given other arguments.

-- 
François Pottier
Francois.Pottier@inria.fr
http://pauillac.inria.fr/~fpottier/
-------------------
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>

