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 RAA27916; Tue, 3 Aug 2004 17:27:18 +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 RAA28428 for ; Tue, 3 Aug 2004 17:27:17 +0200 (MET DST) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i73FRGSH012473 for ; Tue, 3 Aug 2004 17:27:16 +0200 Received: by mproxy.gmail.com with SMTP id 75so148115rnl for ; Tue, 03 Aug 2004 08:27:16 -0700 (PDT) Received: by 10.38.207.19 with SMTP id e19mr19465rng; Tue, 03 Aug 2004 08:27:15 -0700 (PDT) Message-ID: Date: Tue, 3 Aug 2004 11:27:15 -0400 From: John Prevost To: Ocaml Mailing List Subject: Re: [Caml-list] Functors and classes In-Reply-To: <20040803151241.GA25124@annexia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040803120244.GA22304@annexia.org> <20040803121049.GA22418@annexia.org> <20040803131716.GA22773@annexia.org> <20040803151241.GA25124@annexia.org> X-Miltered: at concorde with ID 410FAED4.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; prevost:01 prevost:01 caml-list:01 functors:01 2004:99 lablgtk:01 hides:01 dbi:99 functor:01 fiddle:01 val:01 val:01 struct:01 sig:01 interfaces:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 3 Aug 2004 16:12:41 +0100, Richard Jones wrote: > Thanks. I understand what you're getting at here, and it kind of > reflects the way that lablgtk hides the 'new' operator too, although > I'm not sure if that's for the same reasons. Looks like a > backwards-compatible change to the Dbi module interfaces is required. Actually, there's another issue. The row type defining the methods is visible from outside the functor, but not from inside. I'm... er... not sure how to solve this one. If nobody else has answered, I'll fiddle some more this evening when I'm done with work. John. Example of what causes the compile to fail (using one of the methods we want to see): module type ThingPoolT = sig type 'a connection val connect : unit -> connection val test : connection -> unit end module ThingPool (Thing : ThingIntf) : (ThingPoolT with type connection = Thing.connection) = struct type connection = Thing.connection let connect () = Thing.connect () let test x = x#a + 1 end ------------------- 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