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 TAA16858; Tue, 6 Mar 2001 19:45:10 +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 TAA16857 for ; Tue, 6 Mar 2001 19:45:09 +0100 (MET) Received: from dpt-info.u-strasbg.fr (dpt-info.u-strasbg.fr [130.79.6.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f26Ij8b03806; Tue, 6 Mar 2001 19:45:08 +0100 (MET) Received: from lambda.u-strasbg.fr (lambda.u-strasbg.fr [130.79.90.63]) by dpt-info.u-strasbg.fr (8.9.3/8.9.3) with ESMTP id TAA05219; Tue, 6 Mar 2001 19:44:42 +0100 Received: from luther by lambda.u-strasbg.fr with local (Exim 3.22 #1 (Debian)) id 14aMR9-0005L8-00; Tue, 06 Mar 2001 19:43:55 +0100 Date: Tue, 6 Mar 2001 19:43:55 +0100 To: Chris Hecker Cc: Xavier Leroy , caml-list@inria.fr Subject: Re: [Caml-list] currying... Message-ID: <20010306194355.A20513@lambda.u-strasbg.fr> References: <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> <20010306173150.A12522@pauillac.inria.fr> <4.3.2.7.2.20010306093019.00e181f0@shell16.ba.best.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <4.3.2.7.2.20010306093019.00e181f0@shell16.ba.best.com>; from checker@d6.com on Tue, Mar 06, 2001 at 09:41:38AM -0800 From: Sven LUTHER Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Mar 06, 2001 at 09:41:38AM -0800, Chris Hecker wrote: > > >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. Yes, they do, int -> int -> int is just an abreviation (or parenthesing convention) of int -> (int -> int). Friendly, ven LUther ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr