From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA31563 for caml-redistribution; Mon, 14 Dec 1998 10:01:23 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA04273 for ; Fri, 11 Dec 1998 16:55:17 +0100 (MET) Received: from nenuphar.saclay.cea.fr (nenuphar.saclay.cea.fr [132.166.192.7]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id QAA03114 for ; Fri, 11 Dec 1998 16:55:16 +0100 (MET) Received: from orion.serma.cea.fr (orion.serma.cea.fr [132.166.151.161]) by nenuphar.saclay.cea.fr (8.9.1a/8.9.1/CEAnet-relay-5.0.0.1) with ESMTP id QAA06887; Fri, 11 Dec 1998 16:55:41 +0100 (MET) Received: (from basile@localhost) by orion.serma.cea.fr (8.8.7/8.8.7) id QAA28846; Fri, 11 Dec 1998 16:54:51 +0100 X-Authentication-Warning: orion.serma.cea.fr: basile set sender to Basile.Starynkevitch@cea.fr using -f From: Basile STARYNKEVITCH MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <13937.16459.151212.209032@orion.serma.cea.fr> Date: Fri, 11 Dec 1998 16:54:51 +0100 (CET) To: caml-list@inria.fr, Lout Mailing CC: toumi@dmt.cea.fr Subject: a Lout style for prettyprinting OCAML X-Mailer: VM 6.62 under Emacs 20.3.1 Content-Transfer-Encoding: 8bit Sender: weis [[posted to Lout & Caml lists]] Hello, For those that are interested, I coded (in OCAML) a tiny style for prettyprinting OCAML in LOUT. If you don't know what OCAML is, look at "http://caml.inria.fr/ocaml/". In short, OCAML is a strongly typed functional programming langage with object extensions (and a good bytecode & native compiler implementation). OCAML is developped at INRIA France. It is freely available with sources. If you don't know what LOUT is, look at "http://www.ptc.spbu.ru/~uwe/lout/lout.html". In short, LOUT is a text formatter (similar to LaTeX in spirit) able to format part of text with arbitrary program filters. Lout generates (color) PostScript & PDF. Lout is freely available with sources (GPL-ed), written by Jeff Kingston (ftp.cs.su.oz.au:/jeff/lout/). I wrote a small OCAML lexer caml2lout to output Lout commands and a small camlprint LOUT style to run this caml2lout filter. As a result, you can embed true OCAML code in your Lout document, like: ################ @PP Lout at this @CenteredDisplay @OCAML { let sumf_r a f = let rec sumloop i s = if (i<0) then s else sumloop (i-1) (s +. f a.(i)) in sumloop (Array.length a - 1) 0.0;; [1;2] @ [3;4];; } ################ and Lout (with my package & filter) print Ocaml code with keywords in bold, comments in italics, etc... If you want this tiny stuff (caml2lout.mll in Ocaml & camlprint in Lout), ask me. I'll probably be able to give it (but I have no ftp site, sorry). N.B. Any opinions expressed here are only mine, and not of my organization. N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA. --------------------------------------------------------------------- Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique DRN/DMT/SYSCO * CEA/Saclay bat.460 * 91191 GIF/YVETTE CEDEX * France fax: (33) 1,69.08.96.96; phone: 1,69.08.40.66; home: 1,46.65.45.53 email: Basile point Starynkevitch at cea point fr