From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 25486BCAE for ; Thu, 30 Jun 2005 18:59:19 +0200 (CEST) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5UGxIXf003548 for ; Thu, 30 Jun 2005 18:59:19 +0200 Received: from hydrogene.pps.jussieu.fr (hydrogene.pps.jussieu.fr [134.157.168.1]) by shiva.jussieu.fr (8.12.11/jtpda-5.4) with ESMTP id j5UGw1qB051322 ; Thu, 30 Jun 2005 18:58:01 +0200 (CEST) X-Ids: 168 Received: from hydrogene.pps.jussieu.fr (localhost.localdomain [127.0.0.1]) by hydrogene.pps.jussieu.fr (8.13.4/jtpda-5.4) with ESMTP id j5UGw07A025262 ; Thu, 30 Jun 2005 18:58:00 +0200 Received: from localhost (verlague@localhost) by hydrogene.pps.jussieu.fr (8.13.4/8.13.2/Submit) with ESMTP id j5UGw0aX025259; Thu, 30 Jun 2005 18:58:00 +0200 Date: Thu, 30 Jun 2005 18:58:00 +0200 (CEST) From: Julien Verlaguet To: Andreas Rossberg Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] bizarre type In-Reply-To: <42C4228D.3080000@ps.uni-sb.de> Message-ID: References: <42C4228D.3080000@ps.uni-sb.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.7.2 (shiva.jussieu.fr [134.157.0.168]); Thu, 30 Jun 2005 18:58:02 +0200 (CEST) X-Antivirus: scanned by sophie at shiva.jussieu.fr X-Miltered: at concorde with ID 42C424E6.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at shiva.jussieu.fr with ID 42C42499.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 compiler:01 infers:01 val:01 pps:01 jussieu:01 int:01 int:01 inferred:02 unit:03 unit:03 let:03 bizarre:04 fun:08 fun:08 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: > The compiler just infers the most general type. Ok. But if I write : # type 'a t;; type 'a t # let g (x : 'a t list) (y : 'a)=();; val g : 'a t list -> 'a -> unit = # g ([] : int t list);; - : int -> unit = If I understood well what you just said the inferred type should be : '_a -> unit Or is there something I missed there ? J