English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2008-06-27 (05:57)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] Polymorphic variant as a witness?
On Mon, 2008-06-23 at 19:27 +0900, Jacques Garrigue wrote:
> From: David Teller <David.Teller@univ-orleans.fr>
> * first remark: ocamlc -i works even with non-generalizable types, as
>   it does not generate any .cmi.

Interesting. I'm not sure it's usable in my case, but it's interesting.

> * if you want to be still able to compile, you can write a .mli file
>   not including the witness. ocamlc -i on the .ml will still show you
>   the witness.

Also a good idea. Also possibly unusable in my case, but I'll need to
think about it further.

> * other solution: put everything inside a function, so that the
>   type variable is still generalizable after typing the function.

In that case, the witness remains invisible, doesn't it?


David Teller
 Security of Distributed Systems
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations.