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 AAA28230; Thu, 21 Oct 2004 00:37:44 +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 AAA23878 for ; Thu, 21 Oct 2004 00:37:43 +0200 (MET DST) Received: from kraid.nerim.net (smtp-103-wednesday.nerim.net [62.4.16.103]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9KMbh83010368 for ; Thu, 21 Oct 2004 00:37:43 +0200 Received: from localhost (karryall.dnsalias.org [62.4.18.180]) by kraid.nerim.net (Postfix) with ESMTP id 408B74130E; Thu, 21 Oct 2004 00:37:41 +0200 (CEST) Date: Thu, 21 Oct 2004 00:37:41 +0200 (CEST) Message-Id: <20041021.003741.59483516.oandrieu@nerim.net> To: dobrek@dobrek.de Cc: caml-list@inria.fr Subject: Re: [Caml-list] camlp4r [ $list:some_list$ ] ? From: Olivier Andrieu In-Reply-To: <4176E19E.2070808@dobrek.de> References: <4176E19E.2070808@dobrek.de> X-Mailer: Mew version 4.0.64 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4176E8B7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 camlp:01 andrieu:01 andrieu:01 lukasz:01 2004:99 hallo:99 camlp:01 faq:01 expr:01 expr:01 caml:01 command:98 constructors:01 olivier:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Lukasz Dobrek [Thu, 21 Oct 2004]: > Hallo, > > Simple question but, it took me already a while and stooped me in > the middle of something which was suppose to be simple, fast, nice, > and easy. This is a camlp4 FAQ : http://caml.inria.fr/camlp4/manual/manual010.html#toc36 > The question is simple: > - Why code placed at the end of this letter does not compile. I use > following command to compile it: You can't build lists this way, you have to apply the constructors yourself : let build_list expr_list = List.fold_right (fun x l -> <:expr< [$x$ :: $l$] >>) expr_list <:expr< [] >> -- Olivier ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners