Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Typing problem with polymorphic variants
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] Typing problem with polymorphic variants


Ville-Pertti Keinonen wrote:
> 
> On Tuesday, Apr 1, 2003, at 20:34 Europe/Helsinki, Alessandro Baretta 
> wrote:
> 
>> This just baffles me.
>>
>> > Values do not match:
>> >   val feature :
>> >     [> `Clear | `Length of int | `Pitch of int
>> >               | `Width of 'a] -> string
>> > is not included in
>> >   val feature : [> `Clear] -> string
> 
> 
> Consider what would happen if you tried to pass a `Length of float, 
> which is acceptable according to the latter signature.
> 
> 

Thank you very much.

This is actually a meaningful comment. I wonder if there is 
any sensible way to do what I'm trying to do.

I'll think it over.

Alex

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