Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: forward function definitions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pierre Weis <Pierre.Weis@i...>
Subject: Re: forward function definitions
> 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/