From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1A1DBD45F for ; Tue, 1 Nov 2005 01:11:35 +0100 (CET) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.194]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jA10BYJB006712 for ; Tue, 1 Nov 2005 01:11:34 +0100 Received: by xproxy.gmail.com with SMTP id s15so1125771wxc for ; Mon, 31 Oct 2005 16:11:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qG3/e1UIp48OrdylH5DHTkFu+Aj5Jno2XyLAwmHJSQf1wC5ZBonptr52Cw3ukg9r8ATKHJbVZ+oQRtAvJcHGn71BJKsvZzV2UUOz0BJe2ramHiBsQcnbITE1qgb8BjG5ugl1blg5QEZsB9WaUa1Mj8niiV7Xg7RHFOOgnPSUf2w= Received: by 10.64.185.7 with SMTP id i7mr666019qbf; Mon, 31 Oct 2005 16:11:33 -0800 (PST) Received: by 10.65.23.20 with HTTP; Mon, 31 Oct 2005 16:11:33 -0800 (PST) Message-ID: Date: Tue, 1 Nov 2005 13:11:33 +1300 From: Jonathan Roewen To: skaller Subject: Re: [Caml-list] Stdlib Cc: caml-list@yquem.inria.fr In-Reply-To: <1130779215.11424.21.camel@rosella> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1130769705.488.16.camel@starlight> <1130779215.11424.21.camel@rosella> X-Miltered: at nez-perce with ID 4366B2B6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 stdlib:01 ocaml:01 polymorphism:01 functor:01 abstracted:01 non-trivial:01 haskell:01 haskell:01 polymorphic:01 structures:01 functions:01 int:01 modules:01 defined:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 > Because the technology to do that is WAY in advance of the > current Ocaml. > > What you are asking for is *polyadic* functions, aka > functorial polymorphism. For example, a fold function > that works on all data structures, that is, polymorphic > not just on the data type (such as int), > but also the data functor (such as list). > > Such a function would never work with abstracted modules, > it would require data types to be defined entirely algebraically. > > All of this can be done (I worked on a system that did it), > however it is definitely non-trivial. It is well in advance > of anything Haskell can do also. Really? What about type classes? Haskell has fmap! That's an example of what you mean, correct? Jonathan