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 VAA15222; Wed, 6 Feb 2002 21:22:20 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA07437 for caml-list@pauillac.inria.fr; Wed, 6 Feb 2002 21:22:19 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA13768 for ; Wed, 6 Feb 2002 20:37:31 +0100 (MET) Received: from smtp2.fas.harvard.edu (smtp2.fas.harvard.edu [140.247.34.52]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g16JbUT16325 for ; Wed, 6 Feb 2002 20:37:30 +0100 (MET) Received: from is04.fas.harvard.edu (IDENT:daemon@is04.fas.harvard.edu [140.247.34.24]) by smtp2.fas.harvard.edu with ESMTP id g16JbTt07009; Wed, 6 Feb 2002 14:37:29 -0500 (EST) Received: by is04.fas.harvard.edu with ESMTP id g16JbTY24680; Wed, 6 Feb 2002 14:37:29 -0500 (EST) X-Authentication-Warning: is04.fas.harvard.edu: eddy owned process doing -bs Date: Wed, 6 Feb 2002 14:37:28 -0500 (EST) From: Jonathan D Eddy To: caml-list@inria.fr Subject: [Caml-list] Odd Type Checking Problem Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Does anyone see why the first chunk should type check while the second should not? The only difference is the explicit type annotation on mAny, which seems to be clearly correct. Thanks, Jon (* type checks *) let mAny = fun succ0 input -> succ0 in let ans0 = true in let x = mAny (mAny ans0) in x 1 2 (* does not type check *) let mAny: 'a -> int -> 'a = fun succ0 input -> succ0 in let ans0 = true in let x = mAny (mAny ans0) in x 1 2 ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr