[clean-list] Re: Class restriction to 32

shivkumar chandrasekaran shiv@ece.ucsb.edu
13 Jun 2003 14:37:37 -0700


On Fri, 2003-06-13 at 14:00, Diederik van Arkel wrote:

> I'd guess that you will still run into the same problems. Have you 
> tried defining
> a class combining the individual classes you require e.g.
> 
> class Combined a | ci_1,ci_2,ci_3,...,ci_10 a
> 
> and then having your function typed as
> 
> fun :: ... | Combined a
> 
> I believe this should allow you to reduce the number of function 
> arguments below
> 32 again. Note that you are really running into two restrictions here. 
> One that classes
> are restricted to 32 members and the other that functions are 
> restricted to 32 arguments
> including class restrictions.
> 
> HTH
> 
> Diederik van Arkel

Thanks. I didn't realize this double restriction existed.

Since nested Class definitions don't add up that should solve my
problem. Maybe I can stick these useless Combined class definitions at
the end of the file somewhere :) It would be nice if the next version of
the Clean compiler would either complain about it, or handle it
internally.

Great, that helped a lot. Now to try it all out ... .

--shiv--

PS: It would be nice to have these implementation-dependent restrictions
and current outstanding bugs available publicly somewhere.