Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: [Caml-list] strange behaviour with variants and "cannot be g eneralized"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Beck01, Wolfgang <BeckW@t...>
Subject: RE: [Caml-list] strange behaviour with variants and "cannot be g eneralized"

Didier Remy [mailto:remy@morgon.inria.fr] wrote:

> Here is some explanation of 
> 
>  1) what happened in version 3.06 and 
>  2) how this is related to a relaxed form of value restriction, 
>  3) which is actually orthogonal to the solution implemented in 3.07
> 
> [detailed explanation omitted]

well, I was not aware that compilation of polymorphic variants is an area
of ongoing research. In the OCaml manual, they are not mentioned under
"Language extensions" but as a section in the chapter "An introduction to
Objective Caml". There is a statement

    "In programs, polymorphic variants work like usual ones. You just
    have to prefix their names with a backquote character `."

and this is not true, at least in 3.06. After spending another evening
with weird type errors, I replaced polymorphic variants with ordinary
ones. My project looks uglier now since I had to split up some files,
but at least it compiles and runs.


--
Wolfgang Beck


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