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=AWL 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 15332BC69 for ; Fri, 23 Nov 2007 10:28:00 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALIrRkfAbSoIh2dsb2JhbACPNgEBAQgKKQ X-IronPort-AV: E=Sophos;i="4.21,455,1188770400"; d="scan'208";a="4818057" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail1-smtp-roc.national.inria.fr with ESMTP; 23 Nov 2007 10:27:59 +0100 X-Envelope-From: oliver@first.in-berlin.de Received: from einhorn.in-berlin.de (localhost [127.0.0.1]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id lAN9RsRx027205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 23 Nov 2007 10:27:54 +0100 Received: (from www-data@localhost) by einhorn.in-berlin.de (8.13.6/8.13.6/Submit) id lAN9RrqQ027200; Fri, 23 Nov 2007 10:27:53 +0100 X-Authentication-Warning: einhorn.in-berlin.de: www-data set sender to oliver@first.in-berlin.de using -f Received: from dslb-088-073-117-022.pools.arcor-ip.net (dslb-088-073-117-022.pools.arcor-ip.net [88.73.117.22]) by webmail.in-berlin.de (IMP) with HTTP for ; Fri, 23 Nov 2007 10:27:53 +0100 Message-ID: <1195810073.47469d1986cc0@webmail.in-berlin.de> Date: Fri, 23 Nov 2007 10:27:53 +0100 From: Oliver Bandel To: Andrej.Bauer@andrej.com, Andrej Bauer Cc: Jonathan T Bryant , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Type issue References: <2921298.1195790493072.JavaMail.jtbryant@valdosta.edu> <47468EAC.1070602@fmf.uni-lj.si> In-Reply-To: <47468EAC.1070602@fmf.uni-lj.si> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Spam: no; 0.00; bandel:01 in-berlin:01 andrej:01 andrej:01 bool:01 bool:01 ocaml:01 unspecified:01 oliver:01 oliver:01 caml-list:01 applied:05 problem:05 simpler:05 reasoning:07 Zitat von Andrej Bauer : > Here's a simpler example: > > # fun (g, x) -> (g true, g x) ;; > - : (bool -> 'a) * bool -> 'a * 'a = > > Even though it looks like g could be of type 'b -> 'a, ocaml decides to > go with bool only. I see this on the mailing list every once in a while, > but I always forget the reasoning behind it. [...] g true ===> g is a function applied to a bool; result-type unspecified. g x ===> x is a bool, because g is a function that takes a bool-arg; g is explained above. So, with the application "g true" you already have fixed the type! Jonathan's problem is very similar. Ciao, Oliver