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
Why isn't -rectypes command line option the default
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-21 (00:34)
From: Erik de Castro Lopo <mle+ocaml@m...>
Subject: Why isn't -rectypes command line option the default
Hi all,

If I try to define a recursive type like this:

    type 'a t = 'a * 'a t Lazy.t

the compiler won't accept it unless I add -rectypes to the compile

I know I can avoid this by using a tag:

    type 'a t = Node of 'a * 'a t Lazy.t

but I was wondering if there was a reason why -rectypes wasn't the

  Erik de Castro Lopo
"The very definition of hell is having to maintain someone 
else's Perl code." -- Anonymous