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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 8F4FDBBAF for ; Mon, 26 May 2008 21:29:12 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgBAFqsOkjAXQIniGdsb2JhbACBVZBlAQEBDyCZbg X-IronPort-AV: E=Sophos;i="4.27,543,1204498800"; d="scan'208";a="26626927" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 26 May 2008 21:29:12 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4QJT9s5021588 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 26 May 2008 21:29:12 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah8BAPyrOkjQccgFf2dsb2JhbACBVZBlAQELBQIGBxGZbQ X-IronPort-AV: E=Sophos;i="4.27,543,1204498800"; d="scan'208";a="12738895" Received: from lax-green-bigip-5.dreamhost.com (HELO looneymail-a3.g.dreamhost.com) ([208.113.200.5]) by mail1-smtp-roc.national.inria.fr with ESMTP; 26 May 2008 21:29:09 +0200 Received: from Smokejumper-MBP.local (c-76-113-178-230.hsd1.mn.comcast.net [76.113.178.230]) by looneymail-a3.g.dreamhost.com (Postfix) with ESMTP id E356C27E4C for ; Mon, 26 May 2008 12:29:06 -0700 (PDT) Message-ID: <483B0F81.1020907@fischerventure.com> Date: Mon, 26 May 2008 14:29:05 -0500 From: Robert Fischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Question about type unification References: <20080526122204.GA6727@annexia.org> <20080526192157.3e75c121@orange.fr> In-Reply-To: <20080526192157.3e75c121@orange.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 483B0F85.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; unification:01 compiler:01 beginner's:01 ocaml:01 bug:01 3.0:98 beginners:01 wrote:01 wrote:01 caml-list:01 caml-list:01 bin:01 caml:02 caml:02 archives:02 How is the compiler magically getting from the float to a string value? Can someone break down what's actually happening here for me? ~~ Robert. Fabrice Marchant wrote: > On Mon, 26 May 2008 13:22:04 +0100 > Richard Jones wrote: > >> With this definition: >> >> type 'a t = float >> >> Why is this allowed? >> >> # ((3.0 : unit t) : string t) ;; >> - : string t = 3. > > Never thought to write such odd things. Maybe is there some interesting use ? > > Fabrice > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >