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 PAA30018; Wed, 15 Sep 2004 15:51:53 +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 PAA28974 for ; Wed, 15 Sep 2004 15:51:52 +0200 (MET DST) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i8FDpp7r019213 for ; Wed, 15 Sep 2004 15:51:52 +0200 Received: by mproxy.gmail.com with SMTP id 78so208676rnk for ; Wed, 15 Sep 2004 06:51:30 -0700 (PDT) Received: by 10.38.96.12 with SMTP id t12mr594755rnb; Wed, 15 Sep 2004 06:51:29 -0700 (PDT) Received: by 10.38.75.19 with HTTP; Wed, 15 Sep 2004 06:51:29 -0700 (PDT) Message-ID: <7f8e92aa04091506511648fd2c@mail.gmail.com> Date: Wed, 15 Sep 2004 16:51:29 +0300 From: Radu Grigore Reply-To: Radu Grigore To: Jon Harrop , caml-list@inria.fr Subject: Re: [Caml-list] Confused In-Reply-To: <200409151428.54124.jon@jdh30.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <41472EC6.2080007@gmx.net> <200409151428.54124.jon@jdh30.plus.com> X-Miltered: at concorde with ID 414848F7.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 3.07:01 camlp:01 camlp:01 3.07:01 expr:01 ocaml:01 caml:01 rec:01 rec:01 toplevel:01 toplevel:01 sep:01 syntax:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 15 Sep 2004 14:28:53 +0100, Jon Harrop wrote: > How come this works: [...] > But this does not: > > # let rec build = function 0 -> [] | n -> 1e-6 :: build (n-1) in > let test = 1. :: build 1000;; > Syntax error Look at this. I'm even more confused: ---------------- [rgrig@radugrigore temp]$ ocaml Objective Caml version 3.07+2 # #load "camlp4r.cma";; Camlp4 Parsing version 3.07+2 # let rec b = function 0 -> [] | n -> 2. :: b (n - 1) in let t = 1. :: b 2;; Toplevel input: # let rec b = function 0 -> [] | n -> 2. :: b (n - 1) in let t = 1. :: b 2;; ^^ Parse error: 'and' or 'in' expected (in [expr]) # exit 0;; Toplevel input: # exit 0;; ^^ Parse error: ';' expected after [str_item] (in [phrase]) # ------------------ regards, radu ------------------- 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