From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA28918; Mon, 29 Oct 2001 16:42:36 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA29116 for ; Mon, 29 Oct 2001 16:42:35 +0100 (MET) Received: from mail.mimuw.edu.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f9TFgUP13596 for ; Mon, 29 Oct 2001 16:42:31 +0100 (MET) Received: (from news@localhost) by mail.mimuw.edu.pl (PLD/8.9.3) id QAA02816 for caml-list@inria.fr; Mon, 29 Oct 2001 16:43:05 +0100 X-Authentication-Warning: qrnik.zagroda: news set sender to Marcin 'Qrczak' Kowalczyk using -f From: "Marcin 'Qrczak' Kowalczyk" Subject: [Caml-list] A few questions regarding the compiler Date: Mon, 29 Oct 2001 15:43:01 +0000 (UTC) Organization: Klub Nieszkodliwych =?iso-8859-2?Q?Manjak=F3w?= Message-ID: X-Trace: qrnik.zagroda 1004370181 2811 192.168.0.1 (29 Oct 2001 15:43:01 GMT) X-Complaints-To: abuse@localhost NNTP-Posting-Date: Mon, 29 Oct 2001 15:43:01 +0000 (UTC) User-Agent: slrn/0.9.7.2 (Linux) To: caml-list@inria.fr Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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