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 TAA15381; Tue, 6 Mar 2001 19:00:06 +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 TAA14765 for ; Tue, 6 Mar 2001 19:00:05 +0100 (MET) Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f26I03b02653; Tue, 6 Mar 2001 19:00:03 +0100 (MET) Received: from checkerlap.d6.com ([64.160.54.42]) by mta5.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0G9S005N3FB0E4@mta5.snfc21.pbi.net>; Tue, 6 Mar 2001 09:59:26 -0800 (PST) Date: Tue, 06 Mar 2001 09:41:38 -0800 From: Chris Hecker Subject: Re: [Caml-list] currying... In-reply-to: <20010306173150.A12522@pauillac.inria.fr> X-Sender: def6@shell16.ba.best.com To: Xavier Leroy Cc: caml-list@inria.fr Message-id: <4.3.2.7.2.20010306093019.00e181f0@shell16.ba.best.com> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Content-type: text/plain; charset="us-ascii" References: <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >This is pretty much how it works internally, although the precise >mechanisms used are slightly different in the bytecode interpreter and >in the native-code compiler. Viewed from the outside, it maintains >the illusion that every function takes only one parameter, >and fun x y -> ... behaves like fun x -> (fun y -> ...). Okay, that makes sense, thanks. Now my question is, is there any way to introspect to get at the arity information? I think it must be stored somewhere at runtime, because I can pass both f's to another function because they have the same "illusory type". Or do they? Is int -> int -> int typechecked _exactly_ like int -> (int -> int)? I assume they must be or the illusion wouldn't hold up. I'd also assume this arity check only happens during application and doesn't affect typechecking at all. Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr