Version française
Home     About     Download     Resources     Contact us    
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
Oops.  A couple of errors in that last thing I wrote that weren't the
problem I was trying to illustrate (that's what I get for trying fixes
inline before giving up):

module type ThingPoolT =
  sig
    type connection
    val connect : unit -> connection
    val test : connection -> int
  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