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: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] Typing problem with polymorphic variants

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.

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