English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2008-04-10 (00:52)
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