caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Thomas Colcombet <Thomas.Colcombet@irisa.fr>
To: caml-list@inria.fr
Subject: hiding the 'mutable' modifier
Date: Wed, 16 Feb 2000 15:05:32 +0100	[thread overview]
Message-ID: <38AAAEAC.734A8B13@irisa.fr> (raw)

hello,

I'd like to do something that looks like :

module A =
  (struct
     type t = { mutable field : int }
  end : sig
     type t = { field : int }
  end)

This is not allowed by ocaml, however
I think it would be useful  if the mutable
field is modified, let's say, only during the
construction of terms of type t, but must not
be modified outside the module (for consistency
reasons).
Is there any typing or implementation issue
which prevents such mutable modifier hiding ?

	Thom



             reply	other threads:[~2000-02-17 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-16 14:05 Thomas Colcombet [this message]
2000-02-18  0:31 ` Markus Mottl

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=38AAAEAC.734A8B13@irisa.fr \
    --to=thomas.colcombet@irisa.fr \
    --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;
as well as URLs for NNTP newsgroup(s).