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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id D9B9A7EC41 for ; Tue, 23 Oct 2012 14:19:11 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of lambda.q.q@gmail.com) identity=pra; client-ip=209.85.215.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lambda.q.q@gmail.com"; x-sender="lambda.q.q@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of lambda.q.q@gmail.com designates 209.85.215.54 as permitted sender) identity=mailfrom; client-ip=209.85.215.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lambda.q.q@gmail.com"; x-sender="lambda.q.q@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f54.google.com) identity=helo; client-ip=209.85.215.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lambda.q.q@gmail.com"; x-sender="postmaster@mail-la0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYBALiKhlDRVdc2k2dsb2JhbABEhhS7SAgjAQEBAQcLFBQEI4I3Ag8dATkDDQUfAgUhAhEBBCABBQFJDodQAw8EmyqCZwkDi1mCO4EKhTAnDYlOAQUMgRSKRIM2ghGBEgOIVI0djlg/gViCPg X-IronPort-AV: E=Sophos;i="4.80,634,1344204000"; d="scan'208";a="160077014" Received: from mail-la0-f54.google.com ([209.85.215.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Oct 2012 14:19:11 +0200 Received: by mail-la0-f54.google.com with SMTP id e12so4150800lag.27 for ; Tue, 23 Oct 2012 05:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=WB2OpvhFgGPEuqRLmOni/Rk9DI9MGMO6QQH42G4Omhs=; b=COHrhzBHAjvnhstncm8v4FU//8wR9Vo02hR2gtbweUQCIJXCLt8N0UAmXcdafqNPGU pU8V72e85p1B95EB654LQe+OKHmMF8ANVhKTxWVuUyibzbCSjZAuihjtWIbliiAG0XBG qHzgyQl6vCgPqxMDcgNt0mgW5I+eNk8E7rCAJzoHFs4orWmsDCg4ulGEDkgdsI6xvWzo czKVv3btQw7GLj/IzMJ5RqjYrQgOJnpH4/m/6cttYBegpE+4kPjzanomTh9b3eW4msS3 C8ZF6okWDZxgUca81YeBs6RTZ8iHHIeRzO0z9aZRJ23lNq4jVlS50ycQoqXhJcYANtFK lu/Q== Received: by 10.112.14.161 with SMTP id q1mr4876979lbc.123.1350994750217; Tue, 23 Oct 2012 05:19:10 -0700 (PDT) Received: from golf.niidar.ru.niidar.ru ([178.176.69.217]) by mx.google.com with ESMTPS id f3sm3997340lbm.11.2012.10.23.05.19.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Oct 2012 05:19:08 -0700 (PDT) Sender: Ivan Gotovchits From: Ivan Gotovchits To: caml-list@inria.fr Date: Tue, 23 Oct 2012 16:24:06 +0400 Message-ID: <877gqhnzq1.fsf@golf.niidar.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Caml-list] [Batteries or Camlp4] Functionaly updating several fields in an object I do not know whether the following behaviour is a bug or a feature, so I've decided to consult with a community. Given a simple definition: let create () =3D=20 object val a =3D [] val b =3D [] method step =3D {< a =3D a; b =3D b; >} end when compiling using batteries extensions: ocamlfind ocamlc -c -package batteries.syntax -package lablgtk2 -package lablgtk2.init -package oUnit -package threads -package uuidm -syntax camlp4o -thread -package batteries -syntax camlp4o -I +gsl -I +res -I +xml-light -I +lablgtk2 -I gui -o gui/bug.cmo gui/bug.ml I'm receiving the following error: File "gui/bug.ml", line 7, characters 10-11: Warning S: this expression should have type unit. File "gui/bug.ml", line 8, characters 6-11: Error: This expression has type bool but an expression was expected of type 'a list It seems that compilet thinks that something like this: =C2=ABa =3D begin a; b =3D b end=C2=BB. After disabling syntax extension everything is ok.=20 So the questions: 1) Is this a bug? If not, then how to overcome this unwanted behaviour? 2) If this is a bug? What must be blamed: camlp4 or Batteries? Thanks in advance, for any comments! P.S. My setup: OS: Debian Squeeze 6.0.5 Objective Caml: 3.11.2 Batteries: 1.2.2-1 --=20 (__)=20 (oo)=20 /------\/=20 / | ||=20=20=20 * /\---/\=20 ~~ ~~=20=20=20 ...."Have you mooed today?"...