caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Ohad Rodeh" <ORODEH@il.ibm.com>
To: caml-list@inria.fr
Subject: [Caml-list] Mutability analysis too strict?
Date: Sun, 9 Dec 2001 14:14:19 +0200	[thread overview]
Message-ID: <OF2334A0F2.3D939797-ONC2256B1D.00427F44@telaviv.ibm.com> (raw)

List,
   I have a problem with the mutability analysis for hash-tables.
For example:
     let h = Hashtbl.create 10 ;;
creates:
     h : ('_a, '_b) Hashtbl.t
instead of:
     h ('a, 'b) Hashtbl.t

My specific hashtable contains immutable objects that can be added
and removed to the table.  The default analysis is too strict, forcing me
to use Obj.magic for coercion ('_b -> 'b). This is safe in this case,
because I know
the objects are immutable. However, in the general case, I don't see
why it is neccessary.

 Anyone cares to explain?

     Ohad.


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-12-10  6:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-09 12:14 Ohad Rodeh [this message]
2001-12-09 15:43 [Caml-list] mutability " Ohad Rodeh
2001-12-10  8:13 ` Francois Pottier
2001-12-10  9:12 Ohad Rodeh
2001-12-10  9:28 ` Remi VANICAT
2001-12-10 10:13 Ohad Rodeh
2001-12-10 10:30 ` Basile STARYNKEVITCH
2001-12-10 10:50 ` Francois Pottier
2001-12-10 11:21 ` Mark Seaborn

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=OF2334A0F2.3D939797-ONC2256B1D.00427F44@telaviv.ibm.com \
    --to=orodeh@il.ibm.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;
as well as URLs for NNTP newsgroup(s).