<?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="2003/10/0ffe577457a6e7656e19a496908ae8c2"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-10-14T10:37:40"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?"
  prev="2003/10/7e77f8b374dfe8fb817bb9c327b8a8b7"
  next="2003/10/4e4b1aa34c29e58e6db93315ea915984"
  prev-in-thread="2003/10/a1da1088efdb9e488b62d38e41e18696"
  prev-thread="2003/10/a8fa1894bbd369bf8ba65a0a1f44837a"
  next-thread="2003/10/b91f50d10d7d1db0ef09996f1a13d35c"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Is arrow programming impossible in ocaml?">
<msg 
  url="2003/10/b524697dd6429ef4b3d37491d400e8ff"
  from="Nick Name &lt;nick.name@i...&gt;"
  author="Nick Name"
  date="2003-10-13T23:54:30"
  subject="[Caml-list] Is arrow programming impossible in ocaml?">
<msg 
  url="2003/10/db9e80867677fab23d16f3aa64fd3fad"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-10-14T01:33:30"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?">
<msg 
  url="2003/10/699b12f0ebe78da74ded3e4cba5c6059"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-10-14T03:03:00"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?">
<msg 
  url="2003/10/9fbf3af3346026a5d782ec2c1884b8e3"
  from="Nick Name &lt;nick.name@i...&gt;"
  author="Nick Name"
  date="2003-10-14T11:21:32"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?">
<msg 
  url="2003/10/5e8c9bc26aad51865afc7f8b62e1a423"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-10-15T00:22:17"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?">
<msg 
  url="2003/10/08d0b380cf61c19556ca308cbd7a58ed"
  from="Nick Name &lt;nick.name@i...&gt;"
  author="Nick Name"
  date="2003-10-15T01:48:55"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?">
<msg 
  url="2003/10/145c69b15ab7cd8c7ef9cea28a2ee08d"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-10-15T02:20:10"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?">
<msg 
  url="2003/10/a1da1088efdb9e488b62d38e41e18696"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-10-15T11:40:34"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/10/0ffe577457a6e7656e19a496908ae8c2"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-10-14T10:37:40"
  subject="Re: [Caml-list] Is arrow programming impossible in ocaml?">
</msg>
</msg>
</thread>

<contents>
On Tue, 2003-10-14 at 09:59, Nick Name wrote:
&gt; Hi all, I am trying to work on a project where I need ocaml efficiency 

&gt; type ('a,'b) t = 'a -&gt; 'b
&gt; 
&gt; let rec arr f = f
&gt; 
&gt; let a = arr (fun x -&gt; x)
&gt; -
&gt; 
&gt; and "a" is typed like '_a -&gt; '_a , where I would like it to be typed 'a 
&gt; -&gt; 'a.
&gt; 
&gt; Does anyone think I have other possibilities in writing that kind of 
&gt; higher-order combinator based code, or is it impossible?

It works fine with an annotation:
# type ('a,'b) t = 'a -&gt; 'b
 
  let rec arr f = f
   
  let a = arr   (fun x -&gt; x)
  ;;
type ('a, 'b) t = 'a -&gt; 'b
val arr : 'a -&gt; 'a = &lt;fun&gt;
val a : '_a -&gt; '_a = &lt;fun&gt;
# let a:('a,'a) t = (fun x -&gt; x)
  ;;
val a : ('a, 'a) t = &lt;fun&gt;
# a 1;;
- : int = 1
# a 1.1;;
- : float = 1.1
#


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

