Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Unusual type declaration and Sexplib
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-02-23 (16:50)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Unusual type declaration and Sexplib


> You program below is exactly equivalent to the following,
> without as. Or is your real code something different?

You're right, the formulation without 'as' is simpler, and Sexplib handles
it just fine.  The real code adds a phantom type variable to t, and the
advantage of using 'as' was making the phantomness obvious:

type +'a t = private [< 'b node_t ] as 'b


type +'a t = private [< 'a t node_t ]

But in this case, 'as' does raise more trouble than it's worth...
Anyway, issue solved -- thanks!

Best regards,
Dario Teixeira