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 VAA18533; Tue, 6 Mar 2001 21:14:38 +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 VAA18895 for ; Tue, 6 Mar 2001 21:14:37 +0100 (MET) Received: from smtp2-cm.mail.eni.net (smtp2-cm.mail.eni.net [216.133.226.135]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f26KEab05699 for ; Tue, 6 Mar 2001 21:14:36 +0100 (MET) Received: from checkerlap.d6.com (node-d8e9cca2.powerinter.net [216.233.204.162]) by smtp2-cm.mail.eni.net (8.9.3/8.9.3) with ESMTP id MAA19543; Tue, 6 Mar 2001 12:13:55 -0800 Message-Id: <4.3.2.7.2.20010306120843.037813b0@shell16.ba.best.com> X-Sender: def6@shell16.ba.best.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 06 Mar 2001 12:14:35 -0800 To: qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk), caml-list@inria.fr From: Chris Hecker Subject: Re: [Caml-list] currying... In-Reply-To: References: <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> <4.3.2.7.2.20010306093019.00e181f0@shell16.ba.best.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >> Now my question is, is there any way to introspect to get at the >> arity information? >You shouldn't need it. It's an implementation detail and doesn't have >to have any meaning. It should never be used to drive the semantics - >code should behave in the same way no matter how a function is built >internally. But that's not true if I'm trying to proxy a caml function with a c function. I need to know where the "return value" starts. So yes, on the caml side it's an implementation detail, but on the C side it's important (since it's hooking into the implementation). >AFAIK this internal "uncurrying" is limited to a constant (up to 5 >arguments or something). Above that functions are really implemented >as functions returning functions, in groups of 5 arguments. That can't be true at the lowest level, unless caml does some really stoked partial evaluation analysis. If I write a function that takes 10 parms and uses them in a nonlinear way then I don't think you can factor it into 2 5-parm functions. Unless you're saying it just substitutes them into the function, but then it would have to build a whole new function every time your partially applied. Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr