Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@etu.upmc.fr>
To: caml-list@inria.fr
Cc: brogoff <brogoff@speakeasy.net>
Subject: Re: [Caml-list] Managing a polymorphic environment
Date: Fri, 13 Aug 2004 12:12:00 +0200 (DST)	[thread overview]
Message-ID: <Pine.A41.4.44.0408131208430.524432-100000@ibm1> (raw)
In-Reply-To: <Pine.A41.4.44.0408130937130.524432-100000@ibm1>

    Bonjour,

Diego Olivier Fernandez Pons wrote :

> The problem is to make Env forget it is typed because the
> polymorphic parameter 'a captures the first instanciated type (int
> in my example) even if (==) is polymorphic.

The first problem is that it doesn't work. (==) reduces to (=) for
simple types

let x = 5
let y = 5
let env = Env.add x "x" env
let env = Env.add y "y" env

# Env.get_string x env ;;
- : string = "y"


        Diego Olivier

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


  reply	other threads:[~2004-08-13 10:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-12 14:46 Diego Olivier Fernandez Pons
2004-08-12 15:06 ` Jean-Baptiste Rouquier
2004-08-12 15:19   ` Diego Olivier Fernandez Pons
2004-08-12 17:05 ` brogoff
2004-08-13  8:06   ` Diego Olivier Fernandez Pons
2004-08-13 10:12     ` Diego Olivier Fernandez Pons [this message]
2004-08-13 14:20 Jean-Baptiste Rouquier

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=Pine.A41.4.44.0408131208430.524432-100000@ibm1 \
    --to=diego.fernandez_pons@etu.upmc.fr \
    --cc=brogoff@speakeasy.net \
    --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