Thu Jun 11 18:50:51 CEST 2009


What is the point of guaranteeing type-correctness of generator output
when the first thing you do is to compile it?  I find this[1] to be
quite an interesting point:

> but Template Haskell does not guarantee before running a generator
> that the generator will only generate well-formed code.

That's right, but since generated code will have to be
compiled before execution, only well-typed code will ever
be executed. (The scope-extrusion problem discussed
in previous mails suggests that MetaOCaml's typing system
cannot guarantee to generate only well-formed code either.)

[1] http://www.nabble.com/Questions-about-Equality-of-Code%2C-CSP-and-State-td23866336.html