You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I obtained an array of ranges (populated by calling the range type's leader iterator for a larger, single range). I wanted to make an array storing the size of each range in that first array. Several of the things I tried did not work out, one of which is detailed below and involved zippering the contents of the first array with its index set. It gave the message "Heterogeneous tuples don't support this style of loop yet".
I was able to work around this by iterating over just the index set. It would have been nice for more strategies to have worked.
Is this issue currently blocking your progress?
no
Steps to Reproduce
Source Code:
// Motivated by getting the subranges from the range leader iteratorvar arr:[0..4]range=[1..2, 3..4, 6..7, 5..5, -1..0];
writeln(arr);
var arr2:[arr.domain]int;
// I wanted to store the size of each of the ranges into a separate array, but// writing it like this didn't work.forall (i, r) in (arr.domain, arr) {
arr2[i]= r.size;
}
/* Had to use this instead:for i in arr.domain { arr2[i] = arr[i].size;}*/writeln(arr2);
[minor new tests, not reviewed]
One was while trying to sort the array, the other was trying to use it
in a zippered context
Relates to issue #26616 and #26618
Verified a fresh checkout of the futures
I think the error message is pretty accurate as currently worded, but it may be able to be clarified further. I probably wouldn't go so far as to have it refer to the old pre-zip syntax, since that's probably only going to be meaningful to a few people like you and me who often make this mistake, and less so to contemporary Chapel users (unless there's a notable language that relies on tuples for zippering; I think the argument that led us to add zip() was that that's what most did, though.
Summary of Problem
Description:
I obtained an array of ranges (populated by calling the range type's leader iterator for a larger, single range). I wanted to make an array storing the size of each range in that first array. Several of the things I tried did not work out, one of which is detailed below and involved zippering the contents of the first array with its index set. It gave the message "Heterogeneous tuples don't support this style of loop yet".
I was able to work around this by iterating over just the index set. It would have been nice for more strategies to have worked.
Is this issue currently blocking your progress?
no
Steps to Reproduce
Source Code:
Compile command:
chpl foo.chpl
Execution command:
N/A
Associated Future Test(s):
test/types/range/arrayOfRanges.chpl
#26619Configuration Information
chpl --version
: 2.4.0 pre-release$CHPL_HOME/util/printchplenv --anonymize
: anygcc --version
orclang --version
: anymodule list
: N/AThe text was updated successfully, but these errors were encountered: