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,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 85717BB84 for ; Wed, 28 Jan 2009 15:07:23 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgBABf1f0nZkrEBmWdsb2JhbACMbocgAQEBAQEICwoHEagej0gFhUc X-IronPort-AV: E=Sophos;i="4.37,338,1231110000"; d="scan'208";a="23196925" Received: from web27001.mail.ukl.yahoo.com ([217.146.177.1]) by mail1-smtp-roc.national.inria.fr with SMTP; 28 Jan 2009 15:07:23 +0100 Received: (qmail 50030 invoked by uid 60001); 28 Jan 2009 14:07:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=y1AC92dJ3MSqQvBTGkSNRO7Pa6FHUnL6xVJqz0fuxGtnwHNiBlqsN95eqX709dJO+B0L+mkOKAgSnQCr6HnMh91radworPqmzqDOC4APeM/Bzu3E/DXbmjaZ/jal/V3FRoJK1ACAs6fKhBBVHkD3eVUO/AN/qnajmowOAGFF9nU=; X-YMail-OSG: M4A.uhoVM1l4DW8QNAOWXMysiZJIRBadEPeSk7bwNZrwdA1WFW5f8zaFY6HRM00dcp10mIIdTUWAx_FkZDCni1U7BvfqFQfJokwF3i6Dt38DZKZrMb95OKdnMaIKjwiKQOeKCdjo.YsPafCKS7oxtyn0.FuQhduWjYJGanKmB2s1Hy_ClAFUAsdaEBmnDoZUVIPmWhRiY7yEM_2lDuhnvwdaOVvXPEGemcBAqmKrlMtIdaAfeYNC09CvvdboDC3t1sxKweP5iiG4FqjKFrkn30th Received: from [193.52.94.5] by web27001.mail.ukl.yahoo.com via HTTP; Wed, 28 Jan 2009 14:07:22 GMT X-Mailer: YahooMailRC/1155.45 YahooMailWebService/0.7.260.1 References: <1233150828.7199.213.camel@localhost> Date: Wed, 28 Jan 2009 14:07:22 +0000 (GMT) From: Matthieu Wipliez Subject: Re : [Caml-list] Warning wished To: caml-list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <739317.49579.qm@web27001.mail.ukl.yahoo.com> X-Spam: no; 0.00; matthieu:01 bug:01 compiler:01 unify:01 cheers:01 matthieu:01 signoles:01 beginner's:01 ocaml:01 bug:01 beginners:01 emit:01 caml-list:01 caml-list:01 bin:01 > Hello,=0A> =0A> Is it a bug or a well-known feature that the above progra= m does not emit=0A> a warning (because "f x" should have type unit in the b= ody of "g") ?=0A> =0A> =3D=3D=3D=3D=3D=0A> let f x =3D x=0A> let g x =3D f = x; 1=0A> (* let _ =3D g 2 *)=0A> =3D=3D=3D=3D=0A=0AI'm not familiar with th= e internals of the compiler, but what I suppose is happening is that it tri= es to unify the type of "f x" and "unit", and this succeeds because "f x" h= as type 'a, which can be unified with anything. The meaning of "a;b" seems = to be let _ =3D a in b rather than let () =3D a in b.=0A=0ABut like I said,= these are suppositions.=0A=0ACheers,=0AMatthieu=0A=0A> =0A> Best regards,= =0A> Julien Signoles=0A> =0A> _____________________________________________= __=0A> Caml-list mailing list. Subscription management:=0A> http://yquem.in= ria.fr/cgi-bin/mailman/listinfo/caml-list=0A> Archives: http://caml.inria.f= r=0A> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners=0A> Bu= g reports: http://caml.inria.fr/bin/caml-bugs=0A=0A=0A=0A