Version française
Home     About     Download     Resources     Contact us    
Browse thread
Polymorphic variant as a witness?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe TROESTLER <Christophe.Troestler+ocaml@u...>
Subject: Re: [Caml-list] Polymorphic variant as a witness?
On Sun, 22 Jun 2008 01:11:59 +0200, David Teller wrote:
> 
> I could have a value (let's call it "witness") with type 
>   [> ] ref

Why do you want it to be mutable?

> which I could "touch" into becoming 
>   [> `A] ref

Are you expecting to write [touch `A witness] so [witness] becomes of
type [[> `A] ref]?  If you can do with an immutable [witness], then
you can write a macro to that effet (use: [let witness' = TOUCH `A
witness]).  What exactly is your purpose?

Regards,
C.