From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA28295; Wed, 22 May 2002 00:13:50 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA28267 for ; Wed, 22 May 2002 00:13:49 +0200 (MET DST) Received: from hermes.sc.intel.com (fmr03.intel.com [143.183.121.5]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4LMDmX29051 for ; Wed, 22 May 2002 00:13:48 +0200 (MET DST) Received: from talaria.sc.intel.com (talaria.sc.intel.com [10.3.253.5]) by hermes.sc.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.46 2002/05/09 18:12:26 root Exp $) with ESMTP id g4LEBig11848 for ; Tue, 21 May 2002 07:11:44 -0700 (PDT) Received: from mipos2.intel.com (mipos2-seg48.sc.intel.com [143.183.48.42]) by talaria.sc.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.20 2002/05/13 20:36:03 root Exp $) with ESMTP id g4LMCwu17979 for ; Tue, 21 May 2002 22:12:58 GMT Received: from zws707.sc.intel.com (zws707.sc.intel.com [143.183.38.79]) by mipos2.intel.com (8.11.6/8.11.6/MailSET/hub) with ESMTP id g4LMDjA19073; Tue, 21 May 2002 15:13:46 -0700 (PDT) Received: (from ctchou@localhost) by zws707.sc.intel.com (8.11.6/8.11.6/MailSET/client) id g4LMDjQ26439; Tue, 21 May 2002 15:13:45 -0700 (PDT) Date: Tue, 21 May 2002 15:13:45 -0700 (PDT) Message-Id: <200205212213.g4LMDjQ26439@zws707.sc.intel.com> X-Authentication-Warning: zws707.sc.intel.com: ctchou set sender to ctchou@mipos2.intel.com using -f From: Ching-Tsun Chou To: caml-list@pauillac.inria.fr Subject: [Caml-list] Weird typing problem Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Consider a file "zzz.ml" that contains only two lines: let (<<) f g x = f (g (x)) let list_last = List.hd << List.rev Now, if I load the file interactively, I get: ocaml Objective Caml version 3.04 # #use "zzz.ml" ;; val ( << ) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b = val list_last : '_a list -> '_a = # However, if I try to compile it, I get: ocamlc -c zzz.ml File "zzz.ml", line 2, characters 16-35: The type of this expression, '_a list -> '_a, contains type variables that cannot be generalized Why so? - Ching Tsun ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners