English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Polymorphic Variants and Number Parameterized Types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-01 (15:10)
From: Brian Rogoff <bpr@b...>
Subject: Re: [Caml-list] Polymorphic Variants and Number Parameterized Types
On Mon, 29 Apr 2002 Nadji.Gauthier@lip6.fr wrote:
> > use variants. Also, I'm willing to bet that you uncovered a bug in the
> > type checker (with the "variables can't be generalized" only when in
> > the compiler). Have you filed a bug report yet?
> I haven't. And since I don't fully understand PV typing,
> I prefer not to bother the developers (I fear the
> "this is a feature not a bug" reply :))

Sure, but it is also possible you found a problem and we all could benefit
from its removal.

> But I understand that there may be error when source
> is compiled when there aren't in the interpreter, ex:
>   let x = ref []
> When compiled, this gives :
>   The type of this expression, '_a list ref,
>   contains type variables that cannot be generalized
> And this is perfectly fair (think of 2 different modules
> accessing x, there may be a type clash).

That's right.

> I think the same thing happenned
> in my previous mail but I haven't managed to isolate the problem yet.

I played a bit with your example, and while I haven't isolated the
problem, I found that there is no problem with the reported expression.
The problem only happened when the f_ngt5 (or whatever you called it)
was included and disappeared when it was removed. So it seems like a
genuine bug.

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