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 QAA20943; Wed, 5 Sep 2001 16:01:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 QAA20892 for ; Wed, 5 Sep 2001 16:01:51 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f85E1or23619 for ; Wed, 5 Sep 2001 16:01:50 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id QAA13228 for caml-list@inria.fr; Wed, 5 Sep 2001 16:01:50 +0200 Date: Wed, 5 Sep 2001 16:01:50 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] Different types of streams Message-ID: <20010905160150.Y5393@verdot.inria.fr> References: <20010905140610.V5393@verdot.inria.fr> <200109051256.f85Cuf105667@sarg.ryerson.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0us In-Reply-To: <200109051256.f85Cuf105667@sarg.ryerson.ca>; from dmason@sarg.ryerson.ca on Wed, Sep 05, 2001 at 08:56:41AM -0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Sep 05, 2001 at 08:56:41AM -0400, Dave Mason wrote: > You omitted the part of my original email where I said that I honestly > don't know how easy it is to use this through camlp4o. If it's > trivial (i.e. just add ``-pp camlp4o''), I don't understand why it > won't be the default, and if it's not trivial, I (and several other > people) will be unhappy. Camlp4 allows to write pieces of programs in concrete syntax, representing abstract syntax. I need that for the streams implementation and optimization. In my Camlp4 code, I manipulate things like this: <:expr< let x = y in z >> To have the equivalent in OCaml, I should write: {pstr_desc = Pstr_eval {pexp_desc = Pexp_let (Nonrecursive, [({ppat_desc = Ppat_var "x"; ppat_loc = {loc_start = 4; loc_end = 5; log_ghost = false}}, {pexp_desc = Pexp_ident (Longident.Lident "y"); pexp_loc = {loc_start = 8; loc_end = 9; log_ghost = false}})], {pexp_desc = Pexp_ident (Longident.Lident "z"); pexp_loc = {loc_start = 13; loc_end = 14; log_ghost = false}}); pexp_loc = {loc_start = 0; loc_end = 14; log_ghost = false}}; pstr_loc = {loc_start = 0; loc_end = 14; log_ghost = false}} I don't know for you, but I prefer program with the first form. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- 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