Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Turning off type-checking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] Turning off type-checking
On Tue, 14 May 2002, Jacques Garrigue wrote:
> One thing you might want to try is to write your own interpreter for
> your subset of ocaml. According to the code snippets you posted, it is
> restricted enough, so that should be easy. Then you can experiment
> without compiling, and compile later if you really need to.

Being so lazy, I thought that I could skip writing an interpreter,
because I needed a pretty-printer anyway. And OCaml-code is just fine
for this purpose...

> Note that with some tricks your interpreter can share data
> representation with ocaml, so that your functions could be called
> directly from ocaml (with a bit of magic, of course).

This is an interesting suggestion, thanks!

> As long as your type are not really huge (like in Alain's example), and
> you are not using subtyping, I don't think that there is much room for
> improvement in the compiler.  This said, we find a complexity bug once
> in a while. One of them was quite serious: type checking was done twice
> for arguments in applications. Usually you won't notice it, but if you
> have an application inside an argument inside an argument... this was
> exponential! Unfortunately I don't remember whether this was corrected
> before or after 3.04.

I don't think that I really hit the exponential wall anywhere so it's
probably just that type-checking takes much longer than I had expected.
Well, I can live with it...

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners