Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Jacques Le Normand" <rathereasy@gmail.com>
To: caml-list@inria.fr
Subject: using functors in objects
Date: Wed, 9 Apr 2008 20:52:38 -0400	[thread overview]
Message-ID: <f74178430804091752t1966ca08n87a12cab9f064736@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 433 bytes --]

             reply	other threads:[~2008-04-10  0:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10  0:52 Jacques Le Normand [this message]
2008-04-10 12:05 ` [Caml-list] " Andrej Bauer
2008-04-11  7:52   ` Julien Signoles
2008-04-11 11:59     ` Andrej Bauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f74178430804091752t1966ca08n87a12cab9f064736@mail.gmail.com \
    --to=rathereasy@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox