From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 227F87F0B9 for ; Wed, 7 Sep 2016 12:41:01 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=frederic.bour@lakaban.net; spf=Pass smtp.mailfrom=frederic.bour@lakaban.net; spf=None smtp.helo=postmaster@mail.lakaban.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of frederic.bour@lakaban.net) identity=pra; client-ip=213.251.185.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="frederic.bour@lakaban.net"; x-sender="frederic.bour@lakaban.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of frederic.bour@lakaban.net designates 213.251.185.180 as permitted sender) identity=mailfrom; client-ip=213.251.185.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="frederic.bour@lakaban.net"; x-sender="frederic.bour@lakaban.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.lakaban.net) identity=helo; client-ip=213.251.185.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="frederic.bour@lakaban.net"; x-sender="postmaster@mail.lakaban.net"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A7I5lhxB1EE2uraQYFyVlUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP38r8bcNUDSrc9gkEXOFd2CrakV0qyI6uu7ASRAuc/H6y9SNsQUFlcsso?= =?us-ascii?q?Y/oU8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0Iu?= =?us-ascii?q?frymUt2as8Pi3Om3/9jXYh5UrDu7e7J7ahus/ivLscxDr5HjJicryxCBiHxVYa?= =?us-ascii?q?wCy3llKV+Jnh267MCt5rZn+idZsfsnschNTfOpLOwDUbVEAWF+YCgO78rxuEyb?= =?us-ascii?q?QA=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0C1DAB07s9X/7S5+9VdPQaDDgEBAQEBd?= =?us-ascii?q?SpStiuEESSFeAKCIhEBAQEBAQEBAQEBAV0ngjIYghgBAQQnEQgBATgPCxguVxM?= =?us-ascii?q?IAQGISgquZ4UuAQEFh1opCIgnCIJOhQyFEJlehiKLV4cihX2MUIN7NCCEUm4Bh?= =?us-ascii?q?VUBAQE?= X-IPAS-Result: =?us-ascii?q?A0C1DAB07s9X/7S5+9VdPQaDDgEBAQEBdSpStiuEESSFeAK?= =?us-ascii?q?CIhEBAQEBAQEBAQEBAV0ngjIYghgBAQQnEQgBATgPCxguVxMIAQGISgquZ4UuA?= =?us-ascii?q?QEFh1opCIgnCIJOhQyFEJlehiKLV4cihX2MUIN7NCCEUm4BhVUBAQE?= X-IronPort-AV: E=Sophos;i="5.30,296,1470693600"; d="scan'208";a="235547862" Received: from pepper.lakaban.net (HELO mail.lakaban.net) ([213.251.185.180]) by mail2-smtp-roc.national.inria.fr with ESMTP; 07 Sep 2016 12:41:00 +0200 Received: from [192.168.1.49] (mtg91-4-78-206-197-34.fbx.proxad.net [78.206.197.34]) (Authenticated sender: defre@ygg-drasil.fr) by mail.lakaban.net (Postfix) with ESMTPSA id 087928A1D8E for ; Wed, 7 Sep 2016 10:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lakaban.net; s=default; t=1473244757; bh=mzHHlmHTWJCTVlWpjaWsBWD0EPl1i6Y9/md+WYHgSEY=; h=Subject:To:References:From:Date:In-Reply-To:From; b=KW5Uc01R/sMq6LmwIZeDHJm7Qv47fL6lP6EQw1ByuDtOg6IeHXpCaOPi7fMjNVHav 0Z9LyQ4gjMt2DttU6WD8dby+ay2tIJCMc5UhEx+K5BTb8yGmcqlvKvO1T0Bcm3e5Tj a7+QW+KH0D4NrRLrgb0BTJcctbkwJcyzBQnCMGBc= To: caml-list@inria.fr References: <20160907103816.GA19537@topoi.pooq.com> From: =?UTF-8?B?RnLDqWTDqXJpYyBCb3Vy?= Message-ID: Date: Wed, 7 Sep 2016 12:41:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160907103816.GA19537@topoi.pooq.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] example from manual FTBFS Your snippet of code is a signature, not a structure. Try renaming tt.ml to tt.mli. On 09/07/2016 12:38 PM, Hendrik Boom wrote: > I took an example from > http://caml.inria.fr/pub/docs/u3-ocaml/ocaml-objects.html > > class amateur : object ('a) > method play : 'a -> int -> 'a > end > class professional : object ('a) > method level : int > method play : 'a -> int -> 'a > end > > and tried to compile it: > > hendrik@notlookedfor:~/dv/ocaml/parse/priority$ ocamlc tt.ml -o tt > File "tt.ml", line 4, characters 0-5: > Error: Syntax error > hendrik@notlookedfor:~/dv/ocaml/parse/priority$ > > Those five characters are the word "class" on the second class > declaration. But it's not the word "class". If I leave that second > class declaration out, it still complains at the same point, at the > end of file after the first class declaration. > > Evidently, I'm doing something wrong. > > hendrik@notlookedfor:~/dv/ocaml/parse/priority$ ocamlc -version > 4.01.0 > hendrik@notlookedfor:~/dv/ocaml/parse/priority$ which ocamlc > /home/hendrik/.opam/4.01.0/bin/ocamlc > hendrik@notlookedfor:~/dv/ocaml/parse/priority$ > > -- hendrik > >