Version française
Home     About     Download     Resources     Contact us    
Browse thread
using functors in objects
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Le Normand <rathereasy@g...>
Subject: using functors in objects
hello caml-list,
I would like to do something like this:

module A (X: sig type t end) =
struct
  class c =
  object
    val b = (None : X.t option)
  end
end

class d =
module Y = A(struct type t = d end)
object
  inherit Y.c
end

which, of course, gives me a syntax error. is it possible to bind a module
inside a class?
--Jacques