Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Polymorphic variant abbreviations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] Polymorphic variant abbreviations
Patrick M Doane <patrick@watson.org> writes:


> (* The first works as I would expect, the second gives a very unexpected
> type. There seems to be some kind of unexpected unification going on
> between terms. *)
> 
> let h1 (#b as x1) (#c as x2) = `A [x1; x2]
> let h2 (x1 : #b) (x2 : #c) = `A [x1; x2]
> 

there is unification, a list can only contain item of same type.
-- 
Rémi Vanicat
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr