Browse thread
[Caml-list] Managing a polymorphic environment
-
Diego Olivier Fernandez Pons
- Jean-Baptiste Rouquier
-
brogoff
-
Diego Olivier Fernandez Pons
- Diego Olivier Fernandez Pons
-
Diego Olivier Fernandez Pons
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@e...> |
| Subject: | Re: [Caml-list] Managing a polymorphic environment |
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