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 BAA14375; Tue, 14 Oct 2003 01:54:30 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA19071 for ; Tue, 14 Oct 2003 01:54:29 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from vsmtp9.tin.it (vsmtp9.tin.it [212.216.176.185] (may be forged)) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h9DNsS113296 for ; Tue, 14 Oct 2003 01:54:28 +0200 (MET DST) Received: from vsmtp13.tin.it (212.216.176.207) by vsmtp9.tin.it (7.0.019) id 3F1BE7360357CA36 for caml-list@inria.fr; Tue, 14 Oct 2003 01:54:28 +0200 Received: from furia (80.181.167.129) by vsmtp13.tin.it (7.0.019) id 3F8253470107A179 for caml-list@inria.fr; Tue, 14 Oct 2003 01:54:28 +0200 Received: from localhost ([127.0.0.1]) by furia with esmtp (Exim 3.36 #1 (Debian)) id 1A9Cau-0000QS-00 for ; Tue, 14 Oct 2003 01:59:20 +0200 From: Nick Name To: caml-list@inria.fr Subject: [Caml-list] Is arrow programming impossible in ocaml? Date: Tue, 14 Oct 2003 01:59:20 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310140159.20515.nick.name@inwind.it> X-Loop: caml-list@inria.fr X-Spam: no; 0.00; haskell:01 higher-order:01 combinator:01 semantics:01 ocaml:01 ocaml:01 rec:01 module:03 reproduce:03 arrow:95 arrow:95 let:04 let:04 efficiency:05 polymorphism:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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. Does anyone think I have other possibilities in writing that kind of higher-order combinator based code, or is it impossible? thanks Vincenzo ------------------- 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