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 WAA18395; Wed, 6 Feb 2002 22:09:31 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 WAA17509 for ; Wed, 6 Feb 2002 22:09:30 +0100 (MET) Received: from fep40-svc.tin.it (mta40-acc.tin.it [212.216.176.93]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g16L9Tn21041 for ; Wed, 6 Feb 2002 22:09:30 +0100 (MET) Received: from there ([212.171.40.175]) by fep40-svc.tin.it (InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP id <20020206210928.ZBAC3917.fep40-svc.tin.it@there> for ; Wed, 6 Feb 2002 22:09:28 +0100 Content-Type: text/plain; charset="iso-8859-1" From: stalkern2 To: caml-list@inria.fr Subject: Re: [Caml-list] Odd Type Checking Problem Date: Wed, 6 Feb 2002 22:15:12 -0500 X-Mailer: KMail [version 1.3.1] References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020206210928.ZBAC3917.fep40-svc.tin.it@there> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Beginner's opinion: I think that the compiler/interpreter is clear: 'a->'b->'a is not 'a->'a->'b->'a and that you just let the function starve before giving it the last meatball. Look: # let mAny: 'a -> int -> 'a = fun succ0 input -> succ0 in let ans0 = true in let x = mAny (mAny ans0 1) in x 2;; - : bool = true Ciao Ernesto Alle ore 14:37, mercoledì 06 febbraio 2002, Jonathan D Eddy ha scritto: > (* 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