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 NAA04879; Fri, 13 Dec 2002 13:27:29 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 NAA04875 for ; Fri, 13 Dec 2002 13:27:27 +0100 (MET) Received: from beaune.inria.fr (beaune.inria.fr [128.93.8.3]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBDCRRj04885 for ; Fri, 13 Dec 2002 13:27:27 +0100 (MET) Received: by beaune.inria.fr (8.8.8/1.1.22.3/14Sep99-0328PM) id NAA0000004283; Fri, 13 Dec 2002 13:27:26 +0100 (MET) From: Luc Maranget Message-Id: <200212131227.NAA0000004283@beaune.inria.fr> Subject: Re: [Caml-list] small problem' To: benecke@iws.cs.uni-magdeburg.de Date: Fri, 13 Dec 2002 13:27:26 +0100 (MET) Cc: caml-list@inria.fr In-Reply-To: <200212130902.gBD920L09826@iws.cs.uni-magdeburg.de> from "Klaus Benecke" at déc 13, 2002 10:22:08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > How to omit the syntax error in OCAML in CAML it runs. > let hd = function > [] -> failwith "hd" > | a::l -> a;; > Characters 2-3: > | a::l -> a > ^ > Syntax error > Mit freundlichen Gruessen > Klaus Benecke I do not see what is your problem exactly. If I copy-paste your three lines in ocaml toplevel, I get : $ ocaml Objective Caml version 3.06 # let hd = function [] -> failwith "hd" | a::l -> a;; val hd : 'a list -> 'a = --Luc ------------------- 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