Re: forward function definitions

From: Pierre Weis (Pierre.Weis@inria.fr)
Date: Wed Jun 16 1999 - 22:55:31 MET DST


From: Pierre Weis <Pierre.Weis@inria.fr>
Message-Id: <199906162055.WAA22149@pauillac.inria.fr>
Subject: Re: forward function definitions
To: luther@steed.u-strasbg.fr (luther sven)
Date: Wed, 16 Jun 1999 22:55:31 +0200 (MET DST)
In-Reply-To: <19990616150347.C6385@steed.u-strasbg.fr> from "luther sven" at Jun 16, 99 03:03:47 pm

> Ah, but you can define a wrapper immediately following the definition of the forwarder function :
>
> let f for () = ...
>
> ...
>
> let for ... = ...
> let true_f = f for
>
> Friendly,
>
> Sven LUTHER

Yes you can do so, but you once again get the same polymorphism
problem:
1) If for is used polymorphically in the body of f you're dead.
2) true_f will be monomorphic as well, unless you eta-expand it as in:
   let true_f () = f for ()

PS: for is indeed a keyword, and this identifier cannot be used as a
regular argument or function name ...

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:23 MET