Browse thread
The option -rectypes
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Pascal Cuoq <Pascal.Cuoq@i...> |
| Subject: | Re: The option -rectypes |
> I have some code that compiled in 2.02, but in 2.03 I need the new option > -rectypes of the compilers. > > - What is the background of this change? I can't say much about your example, but maybe I can say a few words about the context. I was one of the people who lobbied to have at least a compiler option to allow recursive types. The application in which we needed recursive types in Caml is Lucid Synchrone, a strongly typed, higher-order synchronous language which uses Ocaml as its target language: http://www-spi.lip6.fr/~pouzet/lucid-synchrone/ In this kind of application, the type system of Ocaml only can get in the way, because Lucid Synchrone already type-checks the Lucid Synchrone programs. It happens to be that (roughly) a well-typed Lucid Synchrone program is compiled in an Ocaml program which is well-typed if recursive types are accepted, and ill-typed if they aren't. The Caml implementors will probably tell you that the use of this flag is discouraged for hand-written programs. This "feature" was removed from Ocaml 1.05 for a good reason (the type-checker reports errors too late) and it should not be used lightly. This said, there must be another change in the objects systems which explains that your program is rejected without -rectypes. Pascal