Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Polymorphic recursion
[ 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@k...>
Subject: Re: [Caml-list] Polymorphic recursion
> From: "Lukasz Stafiniak" <l_stafiniak@hoga.pl>
> 
> > With Your help I ventured again to "typecheck my programs before they are
> > generated" etc. But now I get an error I totally don't
> > understand. (Still it 
> > somehow resembles the problem it posed as an ordinary function.) Could
> > someone explain? I have attached the file.
> 
> The error message I get is:
> File "typedcode.ml", line 55, characters 2-420:
> This field value has type
>   'a annot annot valu_env option -> 'a annot valu -> 'a annot valu_env
> which is less general than 'b. 'b valu_env option -> 'b valu -> 'b valu_env
> 
> Which just means that since 'a annot is not a type variable, it is
> less general than valu.
> Actually, it seems that the type checker is overly restrictive, as
> you have defined
>   type 'a annot = 'a

This is no fixed in CVS.

Jacques Garrigue

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