caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] A few questions regarding the compiler
@ 2001-10-29 15:43 Marcin 'Qrczak' Kowalczyk
  2001-11-11 17:38 ` Xavier Leroy
       [not found] ` <9smdf7$511$1@qrnik.zagroda>
  0 siblings, 2 replies; 10+ messages in thread
From: Marcin 'Qrczak' Kowalczyk @ 2001-10-29 15:43 UTC (permalink / raw)
  To: caml-list

I'm using OCaml as the target language of my compiler of a custom
language, because the OCaml compiler has good quality and the OCaml
language has appropriate runtime characteristics for my language
(regarding side effects, modules, recursion, memory management etc.).

1. Is it possible to setup a custom handler / printer of exceptions
   raised at the toplevel? The language defines how to convert objects
   to strings but of cource OCaml doesn't know that when printing
   exceptions.

   I can ignore the problem. I can also let my compiler wrap each
   toplevel binding which can fail. But perhaps it can be done easier.

2. Why ocamlc & ocamlopt are compiled to bytecode and ocamlc.opt &
   ocamlopt.opt have these names instead of being the default?

   I understand that the native code compiler is not as portable as the
   bytecode compiler. What should be a good policy for using one of the
   four versions of the compiler? I think the -O switch of my compiler
   will change from ocamlc/ocamlc.opt to ocamlopt/ocamlopt.opt,
   with some unknown yet way to choose between * and *.opt - probably
   a configuration file which sets program names (commandline switch
   is not good, I don't need makefiles for my language - the compiler
   manages dependencies itself).

3. I will want to have an interactive interpreter for my language,
   in addition to a compiler of standalone executables.

   I think it should be possible to start ocaml (or a custom toplevel)
   in a subprocess and talk with it through a pipe, giving it
   declarations compiled on the fly. How to suppress printing the
   prompt and the resulting value and type?

   Is there a better way? This one probably won't work on Windows.

4. Am I right that modules are executed exactly in the order provided
   during linking, and that the only requirement is that each module
   is listed after those it depends on?

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^
QRCZAK

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-11-14 16:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-29 15:43 [Caml-list] A few questions regarding the compiler Marcin 'Qrczak' Kowalczyk
2001-11-11 17:38 ` Xavier Leroy
     [not found] ` <9smdf7$511$1@qrnik.zagroda>
2001-11-11 21:54   ` Marcin 'Qrczak' Kowalczyk
2001-11-11 22:09     ` Patrick M Doane
2001-11-13 20:36     ` Xavier Leroy
     [not found]     ` <9ssfsl$fa4$1@qrnik.zagroda>
2001-11-14  3:03       ` Marcin 'Qrczak' Kowalczyk
2001-11-14  9:52         ` Markus Mottl
2001-11-14 13:20         ` David Mentre
     [not found]         ` <9sttmn$kei$1@qrnik.zagroda>
2001-11-14 14:47           ` Marcin 'Qrczak' Kowalczyk
2001-11-14 16:45             ` Marcin 'Qrczak' Kowalczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).