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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 55997BBAF for ; Mon, 26 May 2008 21:38:13 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgBAD6uOkiK54gDiGdsb2JhbACSOgEBAQ8gmXs X-IronPort-AV: E=Sophos;i="4.27,543,1204498800"; d="scan'208";a="11139257" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 May 2008 21:38:13 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4QJcCnB021819 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 26 May 2008 21:38:13 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgBAD6uOkiK54gDiGdsb2JhbACSOgEBAQ8gmXs X-IronPort-AV: E=Sophos;i="4.27,543,1204498800"; d="scan'208";a="11139256" Received: from rouge.crans.org ([138.231.136.3]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 May 2008 21:38:12 +0200 Received: from localhost (localhost.crans.org [127.0.0.1]) by rouge.crans.org (Postfix) with ESMTP id 19FEB8086; Mon, 26 May 2008 21:38:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at crans.org Received: from rouge.crans.org ([10.231.136.3]) by localhost (rouge.crans.org [10.231.136.3]) (amavisd-new, port 10024) with LMTP id hX8oBQvr63xp; Mon, 26 May 2008 21:38:12 +0200 (CEST) Received: from [138.231.138.207] (doomeer.crans.org [138.231.138.207]) by rouge.crans.org (Postfix) with ESMTP id F0C988014; Mon, 26 May 2008 21:38:11 +0200 (CEST) Message-ID: <483B11A5.5030209@doomeer.com> Date: Mon, 26 May 2008 21:38:13 +0200 From: DooMeeR User-Agent: Thunderbird 2.0.0.14 (X11/20080502) MIME-Version: 1.0 To: Robert Fischer Cc: caml-list@inria.fr Subject: Re: [Caml-list] Question about type unification References: <20080526122204.GA6727@annexia.org> <20080526192157.3e75c121@orange.fr> <483B0F81.1020907@fischerventure.com> In-Reply-To: <483B0F81.1020907@fischerventure.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 483B11A4.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; unification:01 compiler:01 abbreviation:01 compiler:01 caml-list:01 string:02 string:02 float:03 float:03 ecrit:06 break:08 actually:10 actually:10 fischer:10 question:13 Robert Fischer a écrit : > How is the compiler magically getting from the float to a string value? Can someone break down > what's actually happening here for me? It's not "getting to" a "string" value but to a "string t" value, which is an abbreviation for "float". The value has type "float", but the user requires type "string t", so the compiler unifies "float" and "string t" which is actually "float" so it's ok, and then the compiler gives the type requested by the user to the value, i.e., "string t". Well, at least, this is how I understand this :) -- Romain Bardou