Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Functors and classes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Prevost <j.prevost@g...>
Subject: Re: [Caml-list] Functors and classes
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.


Example of what causes the compile to fail (using one of the methods
we want to see):

module type ThingPoolT =
    type 'a connection
    val connect : unit -> connection
    val test : connection -> unit

module ThingPool (Thing : ThingIntf) :
    (ThingPoolT with type connection = Thing.connection) =
    type connection = Thing.connection
    let connect () = Thing.connect ()
    let test x = x#a + 1 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: