Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Polymorphic variant typing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gilles Dubochet <dubochet@u...>
Subject: Re: [Caml-list] Polymorphic variant typing
Thanks: that was exactly what I was looking for.

> The reason is simple enough: variants in ocaml are not based on Remy's
> rows, but on a type system with kinded variables, more in Ohori's 
> style.
> This is described in detail in "Simple type inference for structural
> polymorphism", which you can find at
> The main reason for this choice is avoiding making rows explicit,
> i.e. having a multi-sorted type algebra. Note also that ocaml object
> types, while originally based on Remy's system, are hiding their
> row-variables, and can be described in the same formalism.
Just to make it crystal clear for me: You say that the "main reason for 
this choice is avoiding making rows explicit", does this mean that the 
O'Caml team feels that row-based type information is too complicated 
for an average user since you either steer away of hide it in an object 

> Pragmatic reasons for this choice are given in Section 3 of
>   "Typing deep pattern-matching in presence of polymorphic variants"
> which you can find at the same place.

Gilles Dubochet.