-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tuples longer than 20 wide #103
Comments
Yes, because code for tuples or arrays that has to expand "in place" would get too big if it were allowed to go on forever. There has to be some sort of limit. If you need an actual (heterogenous) tuple larger than 20 there's something wrong with your code. Use a record instead. Arrays can be any size, however some code is limited to 20 again, for example _strr converts datatype to a printable form. If you want to print a big array of 20 million elements you need to think about not using 20 million inline calls to _strr, us a loop instead :-) |
Rough .. the requirement is to stop the compiler going into a long loop which would probably be a recursion that would blow the compiler stack .. or cause the client to throw their computer overboard waiting for it. |
Should this still be open? The limit can be increased to say 50. Arrays can be any size.
You can still have an array with millions of elements, you just can't initialise it with a tuple form. There is another case where tuples could grow forever, namely, using type class based polymorphic recursion. However this has its own recursion limit so isn't an excuse for a limit on tuples. The limit on tuples is hard coded, possibly to different values in different places. In principle it could be removed, at risk of some recursions getting into infinite loops. Or it could be set to a much larger value. The question is: why do you want large tuples? |
There's currently a limitation in place that prevents this from happening.
The text was updated successfully, but these errors were encountered: