caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* hiding the 'mutable' modifier
@ 2000-02-16 14:05 Thomas Colcombet
  2000-02-18  0:31 ` Markus Mottl
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Colcombet @ 2000-02-16 14:05 UTC (permalink / raw)
  To: caml-list

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-02-18  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-16 14:05 hiding the 'mutable' modifier Thomas Colcombet
2000-02-18  0:31 ` Markus Mottl

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).