Version française
Home     About     Download     Resources     Contact us    
Browse thread
Polymorphic method and polymorphic type
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] Polymorphic method and polymorphic type
From: SerP <serp@stork.ru>

> but if we use simple variant type instead of polymorphic variants it 
> works perfect
> 
> 
> type 'a get_mode = [ Read | Watch of (#getter as 'a)];;

(Better to avoid revised syntax in such cases, it is confusing here)

I was not aware of that, but this is logical since the problem comes
from expansion, and simple variants do not need to be expanded.
So I should correct my phrasing: explicit polymorphic type variables
inside constrained type parameters of type abbreviations are not
supported.

Jacques Garrigue