On Wed, Feb 20, 2013 at 7:20 AM, <oleg@okmij.org> wrote:


>   Currently metaocaml does not support native code, but it seems that the
> patch only installs ocamlc, is it possible to get ocamlc.opt installed as
> well? (not the ocamlopt.opt) ocamlbuild is not installed either. It would
> be even nicer that ocamlopt.opt could be installed without supporting
> metaocaml, otherwise I have to switch between different compilers from time
> to time.

Yes, it is possible. It is possible almost immediately but I just had
an idea how to do it much better. If works out it will bring essentially
native metaocaml. I will need time to check it though... Well, better
is the enemy of the good.

If you want ocamlopt urgently (without
using brackets and escapes) I can make a patch easily -- or tell you one
line to add to one file. Namely, to the file
asmcomp/cmmgen.ml add at the line 1713 (at the end of the function
emit_constant_field) the following single line:
  | Const_csp_value _  -> assert false

Yes, I understand it saves  a lot of time to not building something necessary when do the compiler-hacking, but it would be nice for the user who try the patch to  see minimum surprise. Would you mind release a new patch which contains everything except that ocamlc, ocaml byte runtime is patched? That would be really helpful for other people to give a try as well.
After that, do make ocamlopt followed by make install. You get
ocamlopt that, as a side benefit, understands the let! monadic
notation (which never made it to the official version, but seems quite
handy).

Monadic notation is fine, since Camlp4/Fan interacts with metaocaml only in the Ast level 

Thanks


--
Regards
-- Bob