From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA24731 for caml-redistribution; Fri, 17 Sep 1999 14:13:01 +0200 (MET DST) 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 SAA32204 for ; Thu, 16 Sep 1999 18:59:42 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id SAA10694; Thu, 16 Sep 1999 18:59:39 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA32366; Thu, 16 Sep 1999 18:59:39 +0200 (MET DST) Message-ID: <19990916185939.24663@pauillac.inria.fr> Date: Thu, 16 Sep 1999 18:59:39 +0200 From: Xavier Leroy To: Francois Pottier , "Pierre CREGUT - FT . BD/CNET/DTL/MSV" , caml-list@inria.fr Cc: caml-list@inria.fr Subject: Re: Parameterized signatures needed ? References: <19990913122532.A4032@lsun605> <19990914114600.57679@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <19990914114600.57679@pauillac.inria.fr>; from Francois Pottier on Tue, Sep 14, 1999 at 11:46:00AM +0200 Sender: weis > In view of the > solutions which exist at the level of expressions, one may suggest > extending O'Caml with > > * either explicit sub-signature constraints, e.g. > > module d(X:sig > module type B < sig type t end > module F(a:A) : sig > module b:B > module c:C with type t = b.t > end > end) : ... It looks like this would fit quite naturally within the OCaml module system. After all, the module language is explicitely typed, has subtyping and a form of parametric polymorphism; bounded polymorphism is the next step. (I haven't checked the details, though.) > * or row variables in signatures, although I am not sure which form > this would take. This looks less natural to me. A very limited form of "row polymorphism" can already be expressed with module type parameters and sub-structures, as in: module d(X:sig module type X module F(a:A) : sig module b: sig type t module M: X end module c:C with type t = b.t end end) : ... but it's very limited and not really practical. - Xavier Leroy