Browse thread
Typing of polymorphic variants
- Philippe Veber
[
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: | Philippe Veber <philippe.veber@g...> |
| Subject: | Typing of polymorphic variants |
Hi list,
I don't understand the following behaviour:
Objective Caml version 3.11.0
# type t = [`A | `B of int u] and 'a u = 'a * t;;
Error: In the definition of t, type int u should be 'a u
# type t = A | B of int u and 'a u = 'a * t;;
type t = A | B of int u
and 'a u = 'a * t
Anyone's got a simple explanation for this ?
ph.