From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 0BC05BB84 for ; Wed, 28 Jan 2009 15:44:23 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAAD+f0lPrU4G/2dsb2JhbADMMIVHBg X-IronPort-AV: E=Sophos;i="4.37,338,1231110000"; d="scan'208";a="34392192" Received: from unknown (HELO oak.tepkom.ru) ([79.173.78.6]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 28 Jan 2009 15:44:22 +0100 Received: from localhost (localhost [127.0.0.1]) by oak.tepkom.ru (Postfix) with ESMTP id E7960311966; Wed, 28 Jan 2009 17:44:17 +0300 (MSK) X-Virus-Scanned: amavisd-new 2.6.1 (20080629) at tepkom.ru Received: from oak.tepkom.ru ([127.0.0.1]) by localhost (oak.tepkom.ru [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uD4aPMeyq-op; Wed, 28 Jan 2009 17:44:17 +0300 (MSK) Received: from [192.168.1.4] (ppp78-37-146-68.pppoe.avangarddsl.ru [78.37.146.68]) (Authenticated sender: db) by oak.tepkom.ru (Postfix) with ESMTP id 275271028E0; Wed, 28 Jan 2009 17:44:17 +0300 (MSK) Message-ID: <49806F33.7090205@tepkom.ru> Date: Wed, 28 Jan 2009 17:44:03 +0300 From: Dmitri Boulytchev User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: Julien SIGNOLES Cc: caml-list Subject: Re: [Caml-list] Warning wished References: <1233150828.7199.213.camel@localhost> <49806746.9030507@tepkom.ru> <1233152896.7199.232.camel@localhost> In-Reply-To: <1233152896.7199.232.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; emits:01 compiler:01 integer:01 caml-list:01 int:01 omitted:01 caml:02 tepkom:02 btw:03 let:03 let:03 object:09 wrong:10 end:12 definitely:12 > Applying g to 1 you will definitely have f x of type int and you have to > take care of the returned integer. Unfortunatly caml emits no warning in > this case (even if I understand why) :(. > Sure :) But as far as I understand this warning means "this non-unit value will definitely be omitted, and this can be possibly wrong". Under this interpretation the compiler has to ensure undoubtedly that the value is always non-unit. BTW you may (temporarily) change your code into something like let f x = [x] of even into let f x = object method get = x end and find all the suspicious places :) Best regards, Dmitri.