<?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/371811a059d4c9d0b4de447e979f5e7b"
  from="Pixel &lt;pixel@m...&gt;"
  author="Pixel"
  date="2002-07-03T23:25:20"
  subject="Re: [Caml-list] simple typing question"
  prev="2002/07/cba22a6889e4519e882d4ef4c384fd14"
  next="2002/07/236bb2df32b9a28b06626688f240ad19"
  prev-in-thread="2002/07/dc5aba42df0bce5e2da1527c3201263e"
  next-in-thread="2002/07/75d4aecf09efc05caede6b7c53c1292f"
  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>
Jacques Garrigue &lt;garrigue@kurims.kyoto-u.ac.jp&gt; writes:

[...]

&gt; Another problem is that it is asymmetric: partial applications could
&gt; be polymorphic, but not results containing several functions:
&gt; 
&gt; let both f = (List.map f, List.iter f)

sorry, i don't understand that pb.


[...]

&gt; let toggle r x = let old = !r in r := x; old
&gt; let make_toggle () = let r = ref [] in toggle r

or worse:

let make_toggle toggle = let r = ref [] in toggle r

no way to know how many parameters toggle can have, so no easy way to
eta-expand. I think it *can* be done at evaluation time, but I'm not
sure.

so my response to Francois Pottier was wrong:

&gt;&gt; &gt;   # let apply f x = f x;;
&gt;&gt; &gt;   val apply : ('a -&gt; 'b) -&gt; 'a -&gt; 'b = &lt;fun&gt;
&gt;&gt; &gt; 
&gt;&gt; &gt; ... You can write applications of `apply' with any
&gt;&gt; &gt; numbers of arguments.
&gt;&gt; 
&gt;&gt; you're right... but this isn't a problem for the stuff i'm talking.
&gt;&gt; 
&gt;&gt; If "wrapping-restoring-eta-equivalence" is done based on the number of
&gt;&gt; parameters *before* instanciation of type variables, it will do.

which was wrong: (even if Francois didn't bother telling :)

# let id f = print_string "foo" ; f

no simple way to eta-expand. Once again, I think it *can* be done at
evaluation time...

[...]

&gt; So, this seems unlikely such changes would go through.

i'm aware of this :)


I wanted to note that partial application semantic is somewhat nasty
when combined with eager evaluation, and that syntactically &amp;
typefully separating functions-returning-functions and
partially-applied-functions could ease understanding.

One way to do this is to add sugar for partial application of tuples,
and having tuples the *default* way of passing parameters.
(once again http://merd.net/choices_syntax.html :)


Thanks!
-------------------
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>

