Open tclose opened 1 year ago
hmm, not sure if I like the syntax.... we would still have to have a separate splitter for more complex cases.
Perhaps the type-checker could be modified to check also inside list, if list is provided and only give warnings in this case?
I have added a new special class called "gathered", which is just a minimal subclass of list. The split syntax stays the same, the type checker just checks the types of the gathered list items instead of the gathered object itself.
I initially tried relaxing the type checker so it could handle lists of the type, but when dealing with complex splitting and combinations you can get lists of lists and it wouldn't be possible to handle all cases (combine states return "gathered" objects instead of lists).
Does this seem reasonable? I think it makes the code more explici
Also, the type-checking code is inseparable from the type-coercing-to-File code we discussed in the last dev meeting (possibly after you left the call), which is required for @effigies hash dispatch PR to work.
I'm not sure about the "gathered" nomenclature though and was toying with "nodespan" or just "array" to designate a value which is to be split across multiple nodes. Any ideas?
How should a type-checker handle the following case in the unittests?
Because the task is split over "file" then it is provided a list of files to run (whereas each task operates on a single file), but type-checking fails on task creation since a list of files are passed to "file" instead of a single file.
Would syntax like this work instead?