caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Nicolas barnier <barnier@recherche.enac.fr>
To: Garry Hodgson <garry@sage.att.com>
Cc: ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] what does this mean?
Date: Wed, 17 Apr 2002 11:18:48 +0200	[thread overview]
Message-ID: <3CBD3DF8.BE7B1D6E@recherche.enac.fr> (raw)
In-Reply-To: <3CBC7B46.9EB83B57@sage.att.com>

Garry Hodgson wrote:
> 
> no, i hadn't thought of that.  works fine now.  thanks!

After thinking about it, I figured out a better explanation for
this restriction. Suppose you have the following code:

let h = Hashtbl.create 10

module M = (struct
  type t = A
  let _ = Hashtbl.add h 0 A
end : sig end)

let t = Hashtbl.get h 0

then type t would be visible outside M, whereas module M,
restricted by its signature, does not export it. I think this
is the meaning of the error message: "The type constructor t
would escape its scope". So it rather is a safe restriction.

Regards

-- Nicolas
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  parent reply	other threads:[~2002-04-17  9:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-16 17:28 Garry Hodgson
2002-04-16 18:06 ` Eric C. Cooper
2002-04-16 19:26   ` Garry Hodgson
     [not found] ` <3CBC64F8.B677F621@recherche.enac.fr>
     [not found]   ` <3CBC7B46.9EB83B57@sage.att.com>
2002-04-17  9:18     ` Nicolas barnier [this message]
2004-04-13  4:26 [Caml-list] What " skaller
2004-04-13 14:00 ` skaller

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=3CBD3DF8.BE7B1D6E@recherche.enac.fr \
    --to=barnier@recherche.enac.fr \
    --cc=caml-list@inria.fr \
    --cc=garry@sage.att.com \
    /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).