From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id DAA12906; Tue, 14 Oct 2003 03:33:30 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA16515 for ; Tue, 14 Oct 2003 03:33:29 +0200 (MET DST) Received: from jalapeno.cc.columbia.edu (jalapeno.cc.columbia.edu [128.59.59.238]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h9E1XS128347 for ; Tue, 14 Oct 2003 03:33:28 +0200 (MET DST) Received: from tw304h3.cpmc.columbia.edu (tw304h3.cpmc.columbia.edu [156.111.84.180]) (user=ot14 mech=LOGIN bits=0) by jalapeno.cc.columbia.edu (8.12.10/8.12.8) with ESMTP id h9E1XGHU027793 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Mon, 13 Oct 2003 21:33:27 -0400 (EDT) From: Oleg Trott To: Nick Name , caml-list@inria.fr Subject: Re: [Caml-list] Is arrow programming impossible in ocaml? Date: Mon, 13 Oct 2003 21:33:13 -0400 User-Agent: KMail/1.5.4 References: <200310140159.20515.nick.name@inwind.it> In-Reply-To: <200310140159.20515.nick.name@inwind.it> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310132133.13347.oleg_trott@columbia.edu> X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.35 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; oleg:01 oleg:01 caml-list:01 haskell:01 3.07:01 higher-order:01 combinator:01 semantics:01 ocaml:01 ocaml:01 rec:01 module:03 wrote:03 reproduce:03 arrow:95 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Monday 13 October 2003 07:59 pm, Nick Name wrote: > Hi all, I am trying to work on a project where I need ocaml efficiency > with rank-2 polymorphism, if I got it correctly (I am not an expert in > programming language semantics). > > Basically I am trying to reproduce FRAN-like usage of arows as in > > http://haskell.cs.yale.edu/yampa/AFPLectureNotes.pdf > > so I have defined my own arrow module etc, but I faced the rank-1 > polymorphism restriction of ocaml. I have cut down my example to: > > - > type ('a,'b) t = 'a -> 'b > > let rec arr f = f > > let a = arr (fun x -> x) > - > > and "a" is typed like '_a -> '_a , where I would like it to be typed 'a > -> 'a. I think OCaml 3.07 makes this possible > Does anyone think I have other possibilities in writing that kind of > higher-order combinator based code, or is it impossible? > > thanks > > Vincenzo -- Oleg Trott ------------------- 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