Version française
Home     About     Download     Resources     Contact us    
Browse thread
Typing of polymorphic variants
[ Home ] [ Index: by date | by threads ]
[ Search: ]

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